castle-web-cli 0.4.106 → 0.4.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.js +118 -33
- package/dist/byo-accounts.d.ts +55 -0
- package/dist/byo-accounts.js +240 -0
- package/dist/byo-auth.d.ts +13 -1
- package/dist/byo-auth.js +336 -20
- package/dist/byo-login.d.ts +14 -0
- package/dist/byo-login.js +196 -0
- package/dist/castleJson.d.ts +15 -0
- package/dist/castleJson.js +24 -0
- package/dist/cli-shim-env.d.ts +1 -0
- package/dist/cli-shim-env.js +13 -0
- package/dist/get-deck.js +1 -11
- package/dist/ide.js +45 -62
- package/dist/imports.js +31 -61
- package/dist/init.js +3 -116
- package/dist/metering.d.ts +7 -0
- package/dist/metering.js +9 -0
- package/dist/native/playtest-browser.js +1 -1
- package/dist/native/tools.js +20 -18
- package/dist/save-deck.js +6 -3
- package/dist/shell/assets/index-BU9_JpPe.js +144 -0
- package/dist/shell/assets/index-wU4ol--C.css +1 -0
- package/dist/shell/index.html +2 -2
- package/package.json +2 -2
- package/dist/shell/assets/index-B-RU1Sa9.js +0 -144
- package/dist/shell/assets/index-B2quTIav.css +0 -1
package/dist/save-deck.js
CHANGED
|
@@ -96,11 +96,14 @@ export async function saveDeck(dir, opts = {}) {
|
|
|
96
96
|
console.error('Not logged in. Run `castle-web login` first.');
|
|
97
97
|
process.exit(1);
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
// `--visibility` arrives as an unchecked string from the command line, so the
|
|
100
|
+
// declared type is no guarantee -- widen to validate what actually came in.
|
|
101
|
+
const requested = opts.visibility ?? 'unlisted';
|
|
102
|
+
if (requested !== 'unlisted' && requested !== 'private') {
|
|
103
|
+
console.error(`Invalid visibility "${requested}". Use unlisted or private.`);
|
|
102
104
|
process.exit(1);
|
|
103
105
|
}
|
|
106
|
+
const visibility = requested;
|
|
104
107
|
const projectDir = path.resolve(dir);
|
|
105
108
|
if (!fs.existsSync(path.join(projectDir, 'index.html'))) {
|
|
106
109
|
console.error(`No index.html found in ${projectDir}`);
|