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/[email protected]",
"@seald-io/nedb": "https://esm.sh/v124/@seald-io/[email protected]",
"popmotion": "https://esm.sh/v124/[email protected]",
"electron-store": "https://esm.sh/v124/[email protected]",
"colors": "https://deno.land/[email protected]/fmt/colors.ts",
"comlink": "https://esm.sh/v124/[email protected]",
"electron": "https://esm.sh/v124/[email protected]",
"extract-zip": "https://esm.sh/v124/[email protected]",
"jszip": "https://esm.sh/v124/[email protected]",
"lit": "https://esm.sh/v124/[email protected]",
"lit/": "https://esm.sh/v124/[email protected]/",
"mime": "https://esm.sh/v124/[email protected]",
"node-forge": "https://esm.sh/v124/[email protected]",
"source-map-support": "https://esm.sh/v124/[email protected]",
"source-map-support/register": "https://esm.sh/v124/[email protected]/register.js",
"zod": "https://esm.sh/v124/[email protected]",
"tar": "https://esm.sh/v124/[email protected]"
},
"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/[email protected]",
"@seald-io/nedb": "https://esm.sh/v124/@seald-io/[email protected]",
"popmotion": "https://esm.sh/v124/[email protected]",
"electron-store": "https://esm.sh/v124/[email protected]",
"colors": "https://deno.land/[email protected]/fmt/colors.ts",
"comlink": "https://esm.sh/v124/[email protected]",
"electron": "https://esm.sh/v124/[email protected]",
"extract-zip": "https://esm.sh/v124/[email protected]",
"jszip": "https://esm.sh/v124/[email protected]",
"lit": "https://esm.sh/v124/[email protected]",
"lit/": "https://esm.sh/v124/[email protected]/",
"mime": "https://esm.sh/v124/[email protected]",
"node-forge": "https://esm.sh/v124/[email protected]",
"source-map-support": "https://esm.sh/v124/[email protected]",
"source-map-support/register": "https://esm.sh/v124/[email protected]/register.js",
"zod": "https://esm.sh/v124/[email protected]",
"tar": "https://esm.sh/v124/[email protected]"
}
}
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.