@powerlines/plugin-id 0.9.125 → 0.9.127
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/_virtual/rolldown_runtime.cjs +29 -1
- package/dist/components/index.cjs +3 -1
- package/dist/components/index.mjs +3 -1
- package/dist/components/nanoid.cjs +18 -4
- package/dist/components/nanoid.mjs +18 -4
- package/dist/index.cjs +44 -1
- package/dist/index.mjs +39 -1
- package/dist/powerlines/src/lib/utilities/file-header.cjs +19 -7
- package/dist/powerlines/src/lib/utilities/file-header.mjs +18 -7
- package/dist/powerlines/src/types/context.d.cts +43 -2
- package/dist/powerlines/src/types/context.d.mts +43 -2
- package/dist/powerlines/src/types/fs.d.cts +14 -0
- package/dist/powerlines/src/types/fs.d.mts +14 -0
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +5 -5
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_file_header = require('../powerlines/src/lib/utilities/file-header.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/components/nanoid.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the nanoid module content.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the nanoid module code.
|
|
9
|
+
*/
|
|
10
|
+
function nanoidModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The ID module provides a set of utilities for generating unique identifiers.
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:id
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${require_file_header.getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
/**
|
|
11
21
|
* Generate a random string
|
|
@@ -87,4 +97,8 @@ export function uniqueId(param?: string | number | undefined, size?: number | un
|
|
|
87
97
|
return id;
|
|
88
98
|
}, "");
|
|
89
99
|
}
|
|
90
|
-
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
exports.nanoidModule = nanoidModule;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import{getFileHeader
|
|
1
|
+
import { getFileHeader } from "../powerlines/src/lib/utilities/file-header.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/components/nanoid.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the nanoid module content.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the nanoid module code.
|
|
9
|
+
*/
|
|
10
|
+
function nanoidModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The ID module provides a set of utilities for generating unique identifiers.
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:id
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
/**
|
|
11
21
|
* Generate a random string
|
|
@@ -87,4 +97,8 @@ export function uniqueId(param?: string | number | undefined, size?: number | un
|
|
|
87
97
|
return id;
|
|
88
98
|
}, "");
|
|
89
99
|
}
|
|
90
|
-
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
export { nanoidModule };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,44 @@
|
|
|
1
|
-
Object.defineProperty(exports
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_components_nanoid = require('./components/nanoid.cjs');
|
|
4
|
+
require('./components/index.cjs');
|
|
5
|
+
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
6
|
+
let defu = require("defu");
|
|
7
|
+
defu = require_rolldown_runtime.__toESM(defu);
|
|
8
|
+
|
|
9
|
+
//#region src/index.ts
|
|
10
|
+
/**
|
|
11
|
+
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
12
|
+
*/
|
|
13
|
+
function plugin(options = {}) {
|
|
14
|
+
return {
|
|
15
|
+
name: "id",
|
|
16
|
+
async config() {
|
|
17
|
+
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `id` build plugin.");
|
|
18
|
+
const config = { id: (0, defu.default)(options, { type: "nanoid" }) };
|
|
19
|
+
if (!config.id.type || !["nanoid"].includes(config.id.type)) {
|
|
20
|
+
if (config.id.type) this.log(__storm_software_config_tools_types.LogLevelLabel.WARN, `Invalid ID generation type "${config.id.type}" specified. Defaulting to "nanoid".`);
|
|
21
|
+
config.id.type = "nanoid";
|
|
22
|
+
}
|
|
23
|
+
this.log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, `Using ID generation library: ${config.id.type}`);
|
|
24
|
+
return config;
|
|
25
|
+
},
|
|
26
|
+
async prepare() {
|
|
27
|
+
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Preparing the ID runtime artifacts for the Powerlines project.`);
|
|
28
|
+
let idModule;
|
|
29
|
+
switch (this.config.id.type) {
|
|
30
|
+
case "nanoid":
|
|
31
|
+
default:
|
|
32
|
+
idModule = require_components_nanoid.nanoidModule;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
await this.emitBuiltin(await Promise.resolve(idModule(this)), "id", "id.ts");
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
var src_default = plugin;
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
exports.default = src_default;
|
|
43
|
+
exports.nanoidModule = require_components_nanoid.nanoidModule;
|
|
44
|
+
exports.plugin = plugin;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,39 @@
|
|
|
1
|
-
import{nanoidModule
|
|
1
|
+
import { nanoidModule } from "./components/nanoid.mjs";
|
|
2
|
+
import "./components/index.mjs";
|
|
3
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
4
|
+
import defu from "defu";
|
|
5
|
+
|
|
6
|
+
//#region src/index.ts
|
|
7
|
+
/**
|
|
8
|
+
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
9
|
+
*/
|
|
10
|
+
function plugin(options = {}) {
|
|
11
|
+
return {
|
|
12
|
+
name: "id",
|
|
13
|
+
async config() {
|
|
14
|
+
this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `id` build plugin.");
|
|
15
|
+
const config = { id: defu(options, { type: "nanoid" }) };
|
|
16
|
+
if (!config.id.type || !["nanoid"].includes(config.id.type)) {
|
|
17
|
+
if (config.id.type) this.log(LogLevelLabel.WARN, `Invalid ID generation type "${config.id.type}" specified. Defaulting to "nanoid".`);
|
|
18
|
+
config.id.type = "nanoid";
|
|
19
|
+
}
|
|
20
|
+
this.log(LogLevelLabel.DEBUG, `Using ID generation library: ${config.id.type}`);
|
|
21
|
+
return config;
|
|
22
|
+
},
|
|
23
|
+
async prepare() {
|
|
24
|
+
this.log(LogLevelLabel.TRACE, `Preparing the ID runtime artifacts for the Powerlines project.`);
|
|
25
|
+
let idModule;
|
|
26
|
+
switch (this.config.id.type) {
|
|
27
|
+
case "nanoid":
|
|
28
|
+
default:
|
|
29
|
+
idModule = nanoidModule;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
await this.emitBuiltin(await Promise.resolve(idModule(this)), "id", "id.ts");
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
var src_default = plugin;
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { src_default as default, nanoidModule, plugin };
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/lib/utilities/file-header.ts
|
|
5
|
+
function getBaseFileHeader(context) {
|
|
6
|
+
return `
|
|
7
|
+
// Generated with ${(0, __stryke_string_format_title_case.titleCase)(context.config.framework)}
|
|
3
8
|
// Note: Do not edit this file manually - it will be overwritten automatically
|
|
4
|
-
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
function getFileHeader(context, options = {}) {
|
|
12
|
+
const { directive = null, prettierIgnore = false } = options;
|
|
13
|
+
return `/* eslint-disable */
|
|
5
14
|
// biome-ignore lint: disable
|
|
6
|
-
${
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
|
|
16
|
+
${getBaseFileHeader(context)}
|
|
17
|
+
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
9
20
|
|
|
10
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.getFileHeader = getFileHeader;
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import{titleCase
|
|
2
|
-
|
|
1
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
2
|
+
|
|
3
|
+
//#region ../powerlines/src/lib/utilities/file-header.ts
|
|
4
|
+
function getBaseFileHeader(context) {
|
|
5
|
+
return `
|
|
6
|
+
// Generated with ${titleCase(context.config.framework)}
|
|
3
7
|
// Note: Do not edit this file manually - it will be overwritten automatically
|
|
4
|
-
|
|
8
|
+
`;
|
|
9
|
+
}
|
|
10
|
+
function getFileHeader(context, options = {}) {
|
|
11
|
+
const { directive = null, prettierIgnore = false } = options;
|
|
12
|
+
return `/* eslint-disable */
|
|
5
13
|
// biome-ignore lint: disable
|
|
6
|
-
${
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
|
|
15
|
+
${getBaseFileHeader(context)}
|
|
16
|
+
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
9
19
|
|
|
10
|
-
|
|
20
|
+
//#endregion
|
|
21
|
+
export { getFileHeader };
|
|
@@ -78,10 +78,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
78
78
|
*/
|
|
79
79
|
allowReturnOutsideFunction?: boolean;
|
|
80
80
|
}
|
|
81
|
+
interface EmitOptions extends WriteOptions {
|
|
82
|
+
/**
|
|
83
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
84
|
+
*/
|
|
85
|
+
emitWithBundler?: boolean;
|
|
86
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
87
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
88
|
+
}
|
|
81
89
|
/**
|
|
82
90
|
* Options for emitting entry virtual files
|
|
83
91
|
*/
|
|
84
|
-
type EmitEntryOptions =
|
|
92
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
85
93
|
/**
|
|
86
94
|
* The unresolved Powerlines context.
|
|
87
95
|
*
|
|
@@ -292,6 +300,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
292
300
|
* The Powerlines builtin virtual files
|
|
293
301
|
*/
|
|
294
302
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
303
|
+
/**
|
|
304
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
305
|
+
*
|
|
306
|
+
* @param code - The source code of the file
|
|
307
|
+
* @param path - The path to write the file to
|
|
308
|
+
* @param options - Additional options for writing the file
|
|
309
|
+
*/
|
|
310
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
311
|
+
/**
|
|
312
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
313
|
+
*
|
|
314
|
+
* @param code - The source code of the file
|
|
315
|
+
* @param path - The path to write the file to
|
|
316
|
+
* @param options - Additional options for writing the file
|
|
317
|
+
*/
|
|
318
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
295
319
|
/**
|
|
296
320
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
297
321
|
*
|
|
@@ -300,7 +324,16 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
300
324
|
* @param path - An optional path to write the builtin file to
|
|
301
325
|
* @param options - Additional options for writing the builtin file
|
|
302
326
|
*/
|
|
303
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
327
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
328
|
+
/**
|
|
329
|
+
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
330
|
+
*
|
|
331
|
+
* @param code - The source code of the builtin file
|
|
332
|
+
* @param id - The unique identifier of the builtin file
|
|
333
|
+
* @param path - An optional path to write the builtin file to
|
|
334
|
+
* @param options - Additional options for writing the builtin file
|
|
335
|
+
*/
|
|
336
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
304
337
|
/**
|
|
305
338
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
306
339
|
*
|
|
@@ -309,6 +342,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
309
342
|
* @param options - Additional options for writing the entry file
|
|
310
343
|
*/
|
|
311
344
|
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
345
|
+
/**
|
|
346
|
+
* Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
347
|
+
*
|
|
348
|
+
* @param code - The source code of the entry file
|
|
349
|
+
* @param path - An optional path to write the entry file to
|
|
350
|
+
* @param options - Additional options for writing the entry file
|
|
351
|
+
*/
|
|
352
|
+
emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
|
|
312
353
|
/**
|
|
313
354
|
* A function to update the context fields using a new user configuration options
|
|
314
355
|
*/
|
|
@@ -80,10 +80,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
80
80
|
*/
|
|
81
81
|
allowReturnOutsideFunction?: boolean;
|
|
82
82
|
}
|
|
83
|
+
interface EmitOptions extends WriteOptions {
|
|
84
|
+
/**
|
|
85
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
86
|
+
*/
|
|
87
|
+
emitWithBundler?: boolean;
|
|
88
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
89
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
90
|
+
}
|
|
83
91
|
/**
|
|
84
92
|
* Options for emitting entry virtual files
|
|
85
93
|
*/
|
|
86
|
-
type EmitEntryOptions =
|
|
94
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
87
95
|
/**
|
|
88
96
|
* The unresolved Powerlines context.
|
|
89
97
|
*
|
|
@@ -294,6 +302,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
294
302
|
* The Powerlines builtin virtual files
|
|
295
303
|
*/
|
|
296
304
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
305
|
+
/**
|
|
306
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
307
|
+
*
|
|
308
|
+
* @param code - The source code of the file
|
|
309
|
+
* @param path - The path to write the file to
|
|
310
|
+
* @param options - Additional options for writing the file
|
|
311
|
+
*/
|
|
312
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
315
|
+
*
|
|
316
|
+
* @param code - The source code of the file
|
|
317
|
+
* @param path - The path to write the file to
|
|
318
|
+
* @param options - Additional options for writing the file
|
|
319
|
+
*/
|
|
320
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
297
321
|
/**
|
|
298
322
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
299
323
|
*
|
|
@@ -302,7 +326,16 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
302
326
|
* @param path - An optional path to write the builtin file to
|
|
303
327
|
* @param options - Additional options for writing the builtin file
|
|
304
328
|
*/
|
|
305
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
329
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
330
|
+
/**
|
|
331
|
+
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
332
|
+
*
|
|
333
|
+
* @param code - The source code of the builtin file
|
|
334
|
+
* @param id - The unique identifier of the builtin file
|
|
335
|
+
* @param path - An optional path to write the builtin file to
|
|
336
|
+
* @param options - Additional options for writing the builtin file
|
|
337
|
+
*/
|
|
338
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
306
339
|
/**
|
|
307
340
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
308
341
|
*
|
|
@@ -311,6 +344,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
311
344
|
* @param options - Additional options for writing the entry file
|
|
312
345
|
*/
|
|
313
346
|
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
347
|
+
/**
|
|
348
|
+
* Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
349
|
+
*
|
|
350
|
+
* @param code - The source code of the entry file
|
|
351
|
+
* @param path - An optional path to write the entry file to
|
|
352
|
+
* @param options - Additional options for writing the entry file
|
|
353
|
+
*/
|
|
354
|
+
emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
|
|
314
355
|
/**
|
|
315
356
|
* A function to update the context fields using a new user configuration options
|
|
316
357
|
*/
|
|
@@ -13,6 +13,13 @@ interface StorageAdapter {
|
|
|
13
13
|
* A name identifying the storage adapter type.
|
|
14
14
|
*/
|
|
15
15
|
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* The storage preset for the adapter.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
21
|
+
*/
|
|
22
|
+
preset?: StoragePreset | null;
|
|
16
23
|
/**
|
|
17
24
|
* Checks if a key exists in the storage.
|
|
18
25
|
*
|
|
@@ -207,6 +214,13 @@ interface WriteOptions {
|
|
|
207
214
|
* @defaultValue false
|
|
208
215
|
*/
|
|
209
216
|
skipFormat?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* The storage preset or adapter name for the output file.
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
222
|
+
*/
|
|
223
|
+
storage?: StoragePreset | string;
|
|
210
224
|
/**
|
|
211
225
|
* Additional metadata for the file.
|
|
212
226
|
*/
|
|
@@ -13,6 +13,13 @@ interface StorageAdapter {
|
|
|
13
13
|
* A name identifying the storage adapter type.
|
|
14
14
|
*/
|
|
15
15
|
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* The storage preset for the adapter.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
21
|
+
*/
|
|
22
|
+
preset?: StoragePreset | null;
|
|
16
23
|
/**
|
|
17
24
|
* Checks if a key exists in the storage.
|
|
18
25
|
*
|
|
@@ -207,6 +214,13 @@ interface WriteOptions {
|
|
|
207
214
|
* @defaultValue false
|
|
208
215
|
*/
|
|
209
216
|
skipFormat?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* The storage preset or adapter name for the output file.
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
222
|
+
*/
|
|
223
|
+
storage?: StoragePreset | string;
|
|
210
224
|
/**
|
|
211
225
|
* Additional metadata for the file.
|
|
212
226
|
*/
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-id",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.127",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
|
|
6
6
|
"repository": {
|
|
@@ -129,15 +129,15 @@
|
|
|
129
129
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@storm-software/config-tools": "^1.188.74",
|
|
132
|
-
"@stryke/path": "^0.24.
|
|
132
|
+
"@stryke/path": "^0.24.1",
|
|
133
133
|
"defu": "^6.1.4",
|
|
134
|
-
"powerlines": "^0.36.
|
|
134
|
+
"powerlines": "^0.36.23"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
|
-
"@powerlines/nx": "^0.11.
|
|
137
|
+
"@powerlines/nx": "^0.11.49",
|
|
138
138
|
"@storm-software/tsup": "^0.2.72",
|
|
139
139
|
"@types/node": "^24.10.4"
|
|
140
140
|
},
|
|
141
141
|
"publishConfig": { "access": "public" },
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "be47e546b48b9a82e460b5c5d4f02fb66e821f18"
|
|
143
143
|
}
|