@prismicio/cli 0.0.3-alpha.xru-support-init-simulator.3 → 0.0.3-alpha.xru-support-init-simulator.5
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/{cli-B3gOeUW7.js → cli-BK_IlQmi.js} +95 -88
- package/dist/{cli-B3gOeUW7.js.map → cli-BK_IlQmi.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/{index-BoGQ9HBK.js → index-CUgTHuhm.js} +2 -2
- package/dist/{index-BoGQ9HBK.js.map → index-CUgTHuhm.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{multipart-parser-BrMZCihi.js → multipart-parser-BFSqMc2V.js} +2 -2
- package/dist/{multipart-parser-BrMZCihi.js.map → multipart-parser-BFSqMc2V.js.map} +1 -1
- package/package.json +5 -5
|
@@ -2534,7 +2534,7 @@ class Body {
|
|
|
2534
2534
|
}
|
|
2535
2535
|
return formData;
|
|
2536
2536
|
}
|
|
2537
|
-
const { toFormData } = await import("./multipart-parser-
|
|
2537
|
+
const { toFormData } = await import("./multipart-parser-BFSqMc2V.js");
|
|
2538
2538
|
return toFormData(this.body, ct2);
|
|
2539
2539
|
}
|
|
2540
2540
|
/**
|
|
@@ -70643,7 +70643,7 @@ const fetch = async (...args) => {
|
|
|
70643
70643
|
if (globalThis.fetch) {
|
|
70644
70644
|
return globalThis.fetch(...args);
|
|
70645
70645
|
} else if (typeof EdgeRuntime !== "string") {
|
|
70646
|
-
return (await import("./index-
|
|
70646
|
+
return (await import("./index-CUgTHuhm.js")).default(...args);
|
|
70647
70647
|
} else {
|
|
70648
70648
|
throw new Error("Invariant: an edge runtime that does not support fetch should not exist");
|
|
70649
70649
|
}
|
|
@@ -82555,7 +82555,7 @@ const meow = (helpText, options8 = {}) => {
|
|
|
82555
82555
|
return result;
|
|
82556
82556
|
};
|
|
82557
82557
|
const name$3 = "@prismicio/cli";
|
|
82558
|
-
const version$k = "0.0.3-alpha.xru-support-init-simulator.
|
|
82558
|
+
const version$k = "0.0.3-alpha.xru-support-init-simulator.5";
|
|
82559
82559
|
const description = "Prismic CLI";
|
|
82560
82560
|
const keywords = ["typescript", "prismic"];
|
|
82561
82561
|
const repository = { "type": "git", "url": "git+https://github.com/prismicio/devtools.git" };
|
|
@@ -125481,7 +125481,7 @@ const createRevalidateRoute = async ({ helpers, options: options8 }) => {
|
|
|
125481
125481
|
helpers
|
|
125482
125482
|
});
|
|
125483
125483
|
};
|
|
125484
|
-
const upsertSliceLibraryIndexFiles$
|
|
125484
|
+
const upsertSliceLibraryIndexFiles$2 = async (context2) => {
|
|
125485
125485
|
const project = await context2.helpers.getProject();
|
|
125486
125486
|
if (!project.config.libraries) {
|
|
125487
125487
|
return;
|
|
@@ -125500,7 +125500,7 @@ const projectInit$2 = async ({ installDependencies: _installDependencies }, cont
|
|
|
125500
125500
|
createExitPreviewRoute(context2),
|
|
125501
125501
|
createRevalidateRoute(context2)
|
|
125502
125502
|
]));
|
|
125503
|
-
await upsertSliceLibraryIndexFiles$
|
|
125503
|
+
await upsertSliceLibraryIndexFiles$2(context2);
|
|
125504
125504
|
};
|
|
125505
125505
|
const createComponentFile$2 = async ({ data, helpers, actions, options: options8 }) => {
|
|
125506
125506
|
const extension = await getJSFileExtension$2({ helpers, options: options8, jsx: true });
|
|
@@ -148281,6 +148281,81 @@ const rejectIfNecessary$1 = (promiseSettledResults) => {
|
|
|
148281
148281
|
throw rejectedReasons[0];
|
|
148282
148282
|
}
|
|
148283
148283
|
};
|
|
148284
|
+
const NON_EDITABLE_FILE_BANNER$1 = "// Code generated by Prismic. DO NOT EDIT.";
|
|
148285
|
+
const getJSFileExtension$1 = async ({ helpers, options: options8 }) => {
|
|
148286
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$1({
|
|
148287
|
+
helpers,
|
|
148288
|
+
options: options8
|
|
148289
|
+
});
|
|
148290
|
+
return isTypeScriptProject ? "ts" : "js";
|
|
148291
|
+
};
|
|
148292
|
+
const pascalCase$1 = (...input) => {
|
|
148293
|
+
return pascalCase$5(input.filter(Boolean).join(" "));
|
|
148294
|
+
};
|
|
148295
|
+
const upsertSliceLibraryIndexFile$1 = async (args) => {
|
|
148296
|
+
const slices2 = await args.actions.readAllSliceModelsForLibrary({
|
|
148297
|
+
libraryID: args.libraryID
|
|
148298
|
+
});
|
|
148299
|
+
let contents;
|
|
148300
|
+
if (args.options.lazyLoadSlices) {
|
|
148301
|
+
contents = stripIndent$2`
|
|
148302
|
+
${NON_EDITABLE_FILE_BANNER$1}
|
|
148303
|
+
|
|
148304
|
+
import { defineAsyncComponent } from "vue";
|
|
148305
|
+
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
148306
|
+
|
|
148307
|
+
export const components = defineSliceZoneComponents({
|
|
148308
|
+
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148309
|
+
const id2 = slice2.model.id;
|
|
148310
|
+
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148311
|
+
model: slice2.model,
|
|
148312
|
+
helpers: args.helpers,
|
|
148313
|
+
libraryID: args.libraryID
|
|
148314
|
+
}));
|
|
148315
|
+
return `${id2}: defineAsyncComponent(() => import("./${dirName}/index.vue"))`;
|
|
148316
|
+
}))).join(",\n")}
|
|
148317
|
+
});
|
|
148318
|
+
`;
|
|
148319
|
+
} else {
|
|
148320
|
+
contents = stripIndent$2`
|
|
148321
|
+
${NON_EDITABLE_FILE_BANNER$1}
|
|
148322
|
+
|
|
148323
|
+
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
148324
|
+
|
|
148325
|
+
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148326
|
+
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148327
|
+
model: slice2.model,
|
|
148328
|
+
helpers: args.helpers,
|
|
148329
|
+
libraryID: args.libraryID
|
|
148330
|
+
}));
|
|
148331
|
+
const componentName = pascalCase$1(slice2.model.name);
|
|
148332
|
+
return `import ${componentName} from "./${dirName}/index.vue";`;
|
|
148333
|
+
}))).join("\n")}
|
|
148334
|
+
|
|
148335
|
+
export const components = defineSliceZoneComponents({
|
|
148336
|
+
${slices2.map((slice2) => {
|
|
148337
|
+
const id2 = slice2.model.id;
|
|
148338
|
+
const componentName = pascalCase$1(slice2.model.name);
|
|
148339
|
+
return `${id2}: ${componentName}`;
|
|
148340
|
+
}).join(",\n")}
|
|
148341
|
+
});
|
|
148342
|
+
`;
|
|
148343
|
+
}
|
|
148344
|
+
const extension = await getJSFileExtension$1({
|
|
148345
|
+
helpers: args.helpers,
|
|
148346
|
+
options: args.options
|
|
148347
|
+
});
|
|
148348
|
+
const filePath = path$1.join(buildSliceLibraryDirectoryPath({
|
|
148349
|
+
libraryID: args.libraryID,
|
|
148350
|
+
helpers: args.helpers
|
|
148351
|
+
}), `index.${extension}`);
|
|
148352
|
+
await writeProjectFile({
|
|
148353
|
+
filename: filePath,
|
|
148354
|
+
contents,
|
|
148355
|
+
format: args.options.format,
|
|
148356
|
+
helpers: args.helpers
|
|
148357
|
+
});
|
|
148358
|
+
};
|
|
148284
148359
|
var __freeze$3 = Object.freeze;
|
|
148285
148360
|
var __defProp$3 = Object.defineProperty;
|
|
148286
148361
|
var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", { value: __freeze$3(cooked.slice()) }));
|
|
@@ -148289,7 +148364,8 @@ const NUXT_PRISMIC = "@nuxtjs/prismic";
|
|
|
148289
148364
|
const installDependencies$1 = async ({ installDependencies: installDependencies2 }) => {
|
|
148290
148365
|
await installDependencies2({
|
|
148291
148366
|
dependencies: {
|
|
148292
|
-
[NUXT_PRISMIC]: "
|
|
148367
|
+
[NUXT_PRISMIC]: "latest",
|
|
148368
|
+
"@prismicio/client": "latest"
|
|
148293
148369
|
},
|
|
148294
148370
|
dev: true
|
|
148295
148371
|
});
|
|
@@ -148320,16 +148396,12 @@ const configurePrismicModule = async ({ helpers }) => {
|
|
|
148320
148396
|
config2.modules.push(NUXT_PRISMIC);
|
|
148321
148397
|
}
|
|
148322
148398
|
if (!hasInlinedConfiguration) {
|
|
148323
|
-
mod.imports.$
|
|
148324
|
-
from: "./prismic.config.json",
|
|
148325
|
-
imported: "apiEndpoint"
|
|
148326
|
-
});
|
|
148327
|
-
mod.imports.$add({
|
|
148399
|
+
mod.imports.$prepend({
|
|
148328
148400
|
from: "./prismic.config.json",
|
|
148329
148401
|
imported: "repositoryName"
|
|
148330
148402
|
});
|
|
148331
148403
|
config2.prismic ||= {};
|
|
148332
|
-
config2.prismic.endpoint = builders.raw("
|
|
148404
|
+
config2.prismic.endpoint = builders.raw("repositoryName");
|
|
148333
148405
|
}
|
|
148334
148406
|
await writeFile(mod, nuxtConfigPath);
|
|
148335
148407
|
};
|
|
@@ -148430,6 +148502,15 @@ const modifyPrismicConfig$1 = async ({ helpers, options: options8, actions }) =>
|
|
|
148430
148502
|
format: options8.format
|
|
148431
148503
|
});
|
|
148432
148504
|
};
|
|
148505
|
+
const upsertSliceLibraryIndexFiles$1 = async (context2) => {
|
|
148506
|
+
const project = await context2.helpers.getProject();
|
|
148507
|
+
if (!project.config.libraries) {
|
|
148508
|
+
return;
|
|
148509
|
+
}
|
|
148510
|
+
await Promise.all(project.config.libraries.map(async (libraryID) => {
|
|
148511
|
+
await upsertSliceLibraryIndexFile$1({ libraryID, ...context2 });
|
|
148512
|
+
}));
|
|
148513
|
+
};
|
|
148433
148514
|
const projectInit$1 = async ({ installDependencies: _installDependencies }, context2) => {
|
|
148434
148515
|
rejectIfNecessary$1(await Promise.allSettled([
|
|
148435
148516
|
installDependencies$1({ installDependencies: _installDependencies }),
|
|
@@ -148438,81 +148519,7 @@ const projectInit$1 = async ({ installDependencies: _installDependencies }, cont
|
|
|
148438
148519
|
moveOrDeleteAppVue(context2),
|
|
148439
148520
|
modifyPrismicConfig$1(context2)
|
|
148440
148521
|
]));
|
|
148441
|
-
|
|
148442
|
-
const pascalCase$1 = (...input) => {
|
|
148443
|
-
return pascalCase$5(input.filter(Boolean).join(" "));
|
|
148444
|
-
};
|
|
148445
|
-
const NON_EDITABLE_FILE_BANNER$1 = "// Code generated by Prismic. DO NOT EDIT.";
|
|
148446
|
-
const getJSFileExtension$1 = async ({ helpers, options: options8 }) => {
|
|
148447
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$1({
|
|
148448
|
-
helpers,
|
|
148449
|
-
options: options8
|
|
148450
|
-
});
|
|
148451
|
-
return isTypeScriptProject ? "ts" : "js";
|
|
148452
|
-
};
|
|
148453
|
-
const upsertSliceLibraryIndexFile$1 = async (args) => {
|
|
148454
|
-
const slices2 = await args.actions.readAllSliceModelsForLibrary({
|
|
148455
|
-
libraryID: args.libraryID
|
|
148456
|
-
});
|
|
148457
|
-
let contents;
|
|
148458
|
-
if (args.options.lazyLoadSlices) {
|
|
148459
|
-
contents = stripIndent$2`
|
|
148460
|
-
${NON_EDITABLE_FILE_BANNER$1}
|
|
148461
|
-
|
|
148462
|
-
import { defineAsyncComponent } from "vue";
|
|
148463
|
-
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
148464
|
-
|
|
148465
|
-
export const components = defineSliceZoneComponents({
|
|
148466
|
-
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148467
|
-
const id2 = slice2.model.id;
|
|
148468
|
-
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148469
|
-
model: slice2.model,
|
|
148470
|
-
helpers: args.helpers,
|
|
148471
|
-
libraryID: args.libraryID
|
|
148472
|
-
}));
|
|
148473
|
-
return `${id2}: defineAsyncComponent(() => import("./${dirName}/index.vue"))`;
|
|
148474
|
-
}))).join(",\n")}
|
|
148475
|
-
});
|
|
148476
|
-
`;
|
|
148477
|
-
} else {
|
|
148478
|
-
contents = stripIndent$2`
|
|
148479
|
-
${NON_EDITABLE_FILE_BANNER$1}
|
|
148480
|
-
|
|
148481
|
-
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
148482
|
-
|
|
148483
|
-
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148484
|
-
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148485
|
-
model: slice2.model,
|
|
148486
|
-
helpers: args.helpers,
|
|
148487
|
-
libraryID: args.libraryID
|
|
148488
|
-
}));
|
|
148489
|
-
const componentName = pascalCase$1(slice2.model.name);
|
|
148490
|
-
return `import ${componentName} from "./${dirName}/index.vue";`;
|
|
148491
|
-
}))).join("\n")}
|
|
148492
|
-
|
|
148493
|
-
export const components = defineSliceZoneComponents({
|
|
148494
|
-
${slices2.map((slice2) => {
|
|
148495
|
-
const id2 = slice2.model.id;
|
|
148496
|
-
const componentName = pascalCase$1(slice2.model.name);
|
|
148497
|
-
return `${id2}: ${componentName}`;
|
|
148498
|
-
}).join(",\n")}
|
|
148499
|
-
});
|
|
148500
|
-
`;
|
|
148501
|
-
}
|
|
148502
|
-
const extension = await getJSFileExtension$1({
|
|
148503
|
-
helpers: args.helpers,
|
|
148504
|
-
options: args.options
|
|
148505
|
-
});
|
|
148506
|
-
const filePath = path$1.join(buildSliceLibraryDirectoryPath({
|
|
148507
|
-
libraryID: args.libraryID,
|
|
148508
|
-
helpers: args.helpers
|
|
148509
|
-
}), `index.${extension}`);
|
|
148510
|
-
await writeProjectFile({
|
|
148511
|
-
filename: filePath,
|
|
148512
|
-
contents,
|
|
148513
|
-
format: args.options.format,
|
|
148514
|
-
helpers: args.helpers
|
|
148515
|
-
});
|
|
148522
|
+
await upsertSliceLibraryIndexFiles$1(context2);
|
|
148516
148523
|
};
|
|
148517
148524
|
var __freeze$2 = Object.freeze;
|
|
148518
148525
|
var __defProp$2 = Object.defineProperty;
|
|
@@ -176956,4 +176963,4 @@ export {
|
|
|
176956
176963
|
getDefaultExportFromCjs$3 as g,
|
|
176957
176964
|
run as r
|
|
176958
176965
|
};
|
|
176959
|
-
//# sourceMappingURL=cli-
|
|
176966
|
+
//# sourceMappingURL=cli-BK_IlQmi.js.map
|