Skip to content

Commit

Permalink
🐛 [plaoc] fix the URL must be of scheme file
Browse files Browse the repository at this point in the history
  • Loading branch information
waterbang committed Jul 4, 2023
1 parent 237e8d9 commit daf0e36
Show file tree
Hide file tree
Showing 11 changed files with 23,728 additions and 41 deletions.
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"sync:next": "deno run -A ./scripts/sync-next.ts",
"sync": "deno run -A ./scripts/sync.ts",
"plaoc": "deno run -A ./plaoc/cli/plaoc.ts",
"plaoc:net": "deno cache --reload https://deno.land/x/plaoc/cli/plaoc.ts && deno install -A -f https://deno.land/x/plaoc/cli/plaoc.ts",
"std": "deno run -A ./std/cli/std.ts"
}
}
20 changes: 1 addition & 19 deletions desktop-dev/deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"importMap": "./import_map.json",
"lock": false,
"exclude": [
"**/assets/",
Expand All @@ -17,25 +18,6 @@
]
}
},
"imports": {
"cbor-x": "https://esm.sh/v124/cbor-x@1.5.3",
"@seald-io/nedb": "https://esm.sh/v124/@seald-io/nedb@4.0.2",
"popmotion": "https://esm.sh/v124/popmotion@11.0.5",
"electron-store": "https://esm.sh/v124/electron-store@8.1.0",
"colors": "https://deno.land/std@0.191.0/fmt/colors.ts",
"comlink": "https://esm.sh/v124/comlink@4.4.1",
"electron": "https://esm.sh/v124/electron@25.2.0",
"extract-zip": "https://esm.sh/v124/extract-zip@2.0.1",
"jszip": "https://esm.sh/v124/jszip@3.10.1",
"lit": "https://esm.sh/v124/lit@2.7.4",
"lit/": "https://esm.sh/v124/lit@2.7.4/",
"mime": "https://esm.sh/v124/mime@3.0.0",
"node-forge": "https://esm.sh/v124/node-forge@1.3.1",
"source-map-support": "https://esm.sh/v124/source-map-support@0.5.21",
"source-map-support/register": "https://esm.sh/v124/source-map-support@0.5.21/register.js",
"zod": "https://esm.sh/v124/zod@3.21.4",
"tar": "https://esm.sh/v124/tar@6.1.15"
},
"tasks": {
"dnt": "deno run -A ./scripts/dnt.ts",
"bundle": "deno run -A ./scripts/bundle.ts",
Expand Down
21 changes: 21 additions & 0 deletions desktop-dev/import_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"imports": {
"cbor-x": "https://esm.sh/v124/cbor-x@1.5.3",
"@seald-io/nedb": "https://esm.sh/v124/@seald-io/nedb@4.0.2",
"popmotion": "https://esm.sh/v124/popmotion@11.0.5",
"electron-store": "https://esm.sh/v124/electron-store@8.1.0",
"colors": "https://deno.land/std@0.191.0/fmt/colors.ts",
"comlink": "https://esm.sh/v124/comlink@4.4.1",
"electron": "https://esm.sh/v124/electron@25.2.0",
"extract-zip": "https://esm.sh/v124/extract-zip@2.0.1",
"jszip": "https://esm.sh/v124/jszip@3.10.1",
"lit": "https://esm.sh/v124/lit@2.7.4",
"lit/": "https://esm.sh/v124/lit@2.7.4/",
"mime": "https://esm.sh/v124/mime@3.0.0",
"node-forge": "https://esm.sh/v124/node-forge@1.3.1",
"source-map-support": "https://esm.sh/v124/source-map-support@0.5.21",
"source-map-support/register": "https://esm.sh/v124/source-map-support@0.5.21/register.js",
"zod": "https://esm.sh/v124/zod@3.21.4",
"tar": "https://esm.sh/v124/tar@6.1.15"
}
}
3 changes: 2 additions & 1 deletion plaoc/cli/helper/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ export class BundleZipGenerator {
},
];
const addFile_DistToUsr = (filepath: string, alias: string = filepath) => {
console.log(import.meta.resolve(`../serve/${filepath}`));
entries.push({
dir: false,
path: `usr/${alias}`,
data: fs.readFileSync(
fileURLToPath(import.meta.resolve(`../../dist/${filepath}`))
fileURLToPath(import.meta.resolve(`../serve/${filepath}`))
),
});
};
Expand Down
Loading

0 comments on commit daf0e36

Please sign in to comment.