@prismicio/cli 0.0.3-alpha.xru-support-init-simulator.4 → 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-BYYDMz3V.js → cli-BK_IlQmi.js} +91 -81
- package/dist/{cli-BYYDMz3V.js.map → cli-BK_IlQmi.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/{index-lrYHPyfQ.js → index-CUgTHuhm.js} +2 -2
- package/dist/{index-lrYHPyfQ.js.map → index-CUgTHuhm.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{multipart-parser-C58IuGJx.js → multipart-parser-BFSqMc2V.js} +2 -2
- package/dist/{multipart-parser-C58IuGJx.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()) }));
|
|
@@ -148427,6 +148502,15 @@ const modifyPrismicConfig$1 = async ({ helpers, options: options8, actions }) =>
|
|
|
148427
148502
|
format: options8.format
|
|
148428
148503
|
});
|
|
148429
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
|
+
};
|
|
148430
148514
|
const projectInit$1 = async ({ installDependencies: _installDependencies }, context2) => {
|
|
148431
148515
|
rejectIfNecessary$1(await Promise.allSettled([
|
|
148432
148516
|
installDependencies$1({ installDependencies: _installDependencies }),
|
|
@@ -148435,81 +148519,7 @@ const projectInit$1 = async ({ installDependencies: _installDependencies }, cont
|
|
|
148435
148519
|
moveOrDeleteAppVue(context2),
|
|
148436
148520
|
modifyPrismicConfig$1(context2)
|
|
148437
148521
|
]));
|
|
148438
|
-
|
|
148439
|
-
const pascalCase$1 = (...input) => {
|
|
148440
|
-
return pascalCase$5(input.filter(Boolean).join(" "));
|
|
148441
|
-
};
|
|
148442
|
-
const NON_EDITABLE_FILE_BANNER$1 = "// Code generated by Prismic. DO NOT EDIT.";
|
|
148443
|
-
const getJSFileExtension$1 = async ({ helpers, options: options8 }) => {
|
|
148444
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$1({
|
|
148445
|
-
helpers,
|
|
148446
|
-
options: options8
|
|
148447
|
-
});
|
|
148448
|
-
return isTypeScriptProject ? "ts" : "js";
|
|
148449
|
-
};
|
|
148450
|
-
const upsertSliceLibraryIndexFile$1 = async (args) => {
|
|
148451
|
-
const slices2 = await args.actions.readAllSliceModelsForLibrary({
|
|
148452
|
-
libraryID: args.libraryID
|
|
148453
|
-
});
|
|
148454
|
-
let contents;
|
|
148455
|
-
if (args.options.lazyLoadSlices) {
|
|
148456
|
-
contents = stripIndent$2`
|
|
148457
|
-
${NON_EDITABLE_FILE_BANNER$1}
|
|
148458
|
-
|
|
148459
|
-
import { defineAsyncComponent } from "vue";
|
|
148460
|
-
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
148461
|
-
|
|
148462
|
-
export const components = defineSliceZoneComponents({
|
|
148463
|
-
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148464
|
-
const id2 = slice2.model.id;
|
|
148465
|
-
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148466
|
-
model: slice2.model,
|
|
148467
|
-
helpers: args.helpers,
|
|
148468
|
-
libraryID: args.libraryID
|
|
148469
|
-
}));
|
|
148470
|
-
return `${id2}: defineAsyncComponent(() => import("./${dirName}/index.vue"))`;
|
|
148471
|
-
}))).join(",\n")}
|
|
148472
|
-
});
|
|
148473
|
-
`;
|
|
148474
|
-
} else {
|
|
148475
|
-
contents = stripIndent$2`
|
|
148476
|
-
${NON_EDITABLE_FILE_BANNER$1}
|
|
148477
|
-
|
|
148478
|
-
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
148479
|
-
|
|
148480
|
-
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148481
|
-
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148482
|
-
model: slice2.model,
|
|
148483
|
-
helpers: args.helpers,
|
|
148484
|
-
libraryID: args.libraryID
|
|
148485
|
-
}));
|
|
148486
|
-
const componentName = pascalCase$1(slice2.model.name);
|
|
148487
|
-
return `import ${componentName} from "./${dirName}/index.vue";`;
|
|
148488
|
-
}))).join("\n")}
|
|
148489
|
-
|
|
148490
|
-
export const components = defineSliceZoneComponents({
|
|
148491
|
-
${slices2.map((slice2) => {
|
|
148492
|
-
const id2 = slice2.model.id;
|
|
148493
|
-
const componentName = pascalCase$1(slice2.model.name);
|
|
148494
|
-
return `${id2}: ${componentName}`;
|
|
148495
|
-
}).join(",\n")}
|
|
148496
|
-
});
|
|
148497
|
-
`;
|
|
148498
|
-
}
|
|
148499
|
-
const extension = await getJSFileExtension$1({
|
|
148500
|
-
helpers: args.helpers,
|
|
148501
|
-
options: args.options
|
|
148502
|
-
});
|
|
148503
|
-
const filePath = path$1.join(buildSliceLibraryDirectoryPath({
|
|
148504
|
-
libraryID: args.libraryID,
|
|
148505
|
-
helpers: args.helpers
|
|
148506
|
-
}), `index.${extension}`);
|
|
148507
|
-
await writeProjectFile({
|
|
148508
|
-
filename: filePath,
|
|
148509
|
-
contents,
|
|
148510
|
-
format: args.options.format,
|
|
148511
|
-
helpers: args.helpers
|
|
148512
|
-
});
|
|
148522
|
+
await upsertSliceLibraryIndexFiles$1(context2);
|
|
148513
148523
|
};
|
|
148514
148524
|
var __freeze$2 = Object.freeze;
|
|
148515
148525
|
var __defProp$2 = Object.defineProperty;
|
|
@@ -176953,4 +176963,4 @@ export {
|
|
|
176953
176963
|
getDefaultExportFromCjs$3 as g,
|
|
176954
176964
|
run as r
|
|
176955
176965
|
};
|
|
176956
|
-
//# sourceMappingURL=cli-
|
|
176966
|
+
//# sourceMappingURL=cli-BK_IlQmi.js.map
|