@powerlines/plugin-untyped 0.2.314 → 0.2.316
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/package.json +4 -4
- package/dist/_virtual/_rolldown/runtime.mjs +0 -3
- package/dist/index.cjs +0 -39
- package/dist/index.d.cts +0 -19
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -19
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -38
- package/dist/index.mjs.map +0 -1
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +0 -2
- package/dist/types/index.d.mts +0 -2
- package/dist/types/index.mjs +0 -1
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +0 -35
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -35
- package/dist/types/plugin.d.mts.map +0 -1
- package/dist/types/plugin.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-untyped",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.316",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to use Untyped for code generation based on user-defined schemas.",
|
|
6
6
|
"repository": {
|
|
@@ -91,14 +91,14 @@
|
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@storm-software/untyped": "^0.24.102",
|
|
93
93
|
"@stryke/convert": "^0.6.56",
|
|
94
|
-
"powerlines": "^0.42.
|
|
94
|
+
"powerlines": "^0.42.4"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
97
|
+
"@powerlines/plugin-plugin": "^0.12.314",
|
|
98
98
|
"@storm-software/config": "^1.135.40",
|
|
99
99
|
"@types/node": "^25.5.0"
|
|
100
100
|
},
|
|
101
101
|
"publishConfig": { "access": "public" },
|
|
102
102
|
"types": "./dist/index.d.cts",
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "c3243c1ec0fbacb4afd4bd3db20432f443334076"
|
|
104
104
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
let _storm_software_untyped_generate = require("@storm-software/untyped/generate");
|
|
3
|
-
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
4
|
-
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
5
|
-
|
|
6
|
-
//#region src/index.ts
|
|
7
|
-
/**
|
|
8
|
-
* A Powerlines plugin to use Untyped for code generation based on user-defined schemas.
|
|
9
|
-
*
|
|
10
|
-
* @param options - The plugin options.
|
|
11
|
-
* @returns A Powerlines plugin instance.
|
|
12
|
-
*/
|
|
13
|
-
const plugin = (options = {}) => {
|
|
14
|
-
return {
|
|
15
|
-
name: "untyped",
|
|
16
|
-
config() {
|
|
17
|
-
return { untyped: {
|
|
18
|
-
schema: "{root}/**/{untyped.ts,*.untyped.ts}",
|
|
19
|
-
...options
|
|
20
|
-
} };
|
|
21
|
-
},
|
|
22
|
-
async configResolved() {
|
|
23
|
-
if (!this.config.untyped.schema) throw new Error("Untyped plugin requires a schema path or glob pattern to be specified in the configuration.");
|
|
24
|
-
this.config.untyped.schema = (0, _stryke_convert_to_array.toArray)(this.config.untyped.schema).map((path) => (0, powerlines_plugin_utils.replacePathTokens)(this, path));
|
|
25
|
-
this.untyped = (0, _storm_software_untyped_generate.getGenerateAction)(this.workspaceConfig);
|
|
26
|
-
},
|
|
27
|
-
async prepare() {
|
|
28
|
-
return this.untyped({
|
|
29
|
-
entry: this.config.untyped.schema,
|
|
30
|
-
outputPath: this.config.untyped.outputPath,
|
|
31
|
-
generatedBy: this.config.framework
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
exports.default = plugin;
|
|
39
|
-
exports.plugin = plugin;
|
package/dist/index.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
-
import { Plugin } from "powerlines";
|
|
3
|
-
|
|
4
|
-
//#region src/index.d.ts
|
|
5
|
-
declare module "powerlines" {
|
|
6
|
-
interface Config {
|
|
7
|
-
untyped?: UntypedPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* A Powerlines plugin to use Untyped for code generation based on user-defined schemas.
|
|
12
|
-
*
|
|
13
|
-
* @param options - The plugin options.
|
|
14
|
-
* @returns A Powerlines plugin instance.
|
|
15
|
-
*/
|
|
16
|
-
declare const plugin: <TContext extends UntypedPluginContext = UntypedPluginContext>(options?: UntypedPluginOptions) => Plugin<TContext>;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig, plugin as default, plugin };
|
|
19
|
-
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YA4BY,MAAA;IACR,OAAA,GAAU,oBAAA;EAAA;AAAA;;;;;;;cAUD,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
-
import { Plugin } from "powerlines";
|
|
3
|
-
|
|
4
|
-
//#region src/index.d.ts
|
|
5
|
-
declare module "powerlines" {
|
|
6
|
-
interface Config {
|
|
7
|
-
untyped?: UntypedPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* A Powerlines plugin to use Untyped for code generation based on user-defined schemas.
|
|
12
|
-
*
|
|
13
|
-
* @param options - The plugin options.
|
|
14
|
-
* @returns A Powerlines plugin instance.
|
|
15
|
-
*/
|
|
16
|
-
declare const plugin: <TContext extends UntypedPluginContext = UntypedPluginContext>(options?: UntypedPluginOptions) => Plugin<TContext>;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig, plugin as default, plugin };
|
|
19
|
-
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YA4BY,MAAA;IACR,OAAA,GAAU,oBAAA;EAAA;AAAA;;;;;;;cAUD,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { getGenerateAction } from "@storm-software/untyped/generate";
|
|
2
|
-
import { toArray } from "@stryke/convert/to-array";
|
|
3
|
-
import { replacePathTokens } from "powerlines/plugin-utils";
|
|
4
|
-
|
|
5
|
-
//#region src/index.ts
|
|
6
|
-
/**
|
|
7
|
-
* A Powerlines plugin to use Untyped for code generation based on user-defined schemas.
|
|
8
|
-
*
|
|
9
|
-
* @param options - The plugin options.
|
|
10
|
-
* @returns A Powerlines plugin instance.
|
|
11
|
-
*/
|
|
12
|
-
const plugin = (options = {}) => {
|
|
13
|
-
return {
|
|
14
|
-
name: "untyped",
|
|
15
|
-
config() {
|
|
16
|
-
return { untyped: {
|
|
17
|
-
schema: "{root}/**/{untyped.ts,*.untyped.ts}",
|
|
18
|
-
...options
|
|
19
|
-
} };
|
|
20
|
-
},
|
|
21
|
-
async configResolved() {
|
|
22
|
-
if (!this.config.untyped.schema) throw new Error("Untyped plugin requires a schema path or glob pattern to be specified in the configuration.");
|
|
23
|
-
this.config.untyped.schema = toArray(this.config.untyped.schema).map((path) => replacePathTokens(this, path));
|
|
24
|
-
this.untyped = getGenerateAction(this.workspaceConfig);
|
|
25
|
-
},
|
|
26
|
-
async prepare() {
|
|
27
|
-
return this.untyped({
|
|
28
|
-
entry: this.config.untyped.schema,
|
|
29
|
-
outputPath: this.config.untyped.outputPath,
|
|
30
|
-
generatedBy: this.config.framework
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
export { plugin as default, plugin };
|
|
38
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { getGenerateAction } from \"@storm-software/untyped/generate\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport type { Plugin } from \"powerlines\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\nimport { UntypedPluginContext, UntypedPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n untyped?: UntypedPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to use Untyped for code generation based on user-defined schemas.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends UntypedPluginContext = UntypedPluginContext\n>(\n options: UntypedPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"untyped\",\n config() {\n return {\n untyped: {\n schema: \"{root}/**/{untyped.ts,*.untyped.ts}\",\n ...options\n }\n };\n },\n async configResolved() {\n if (!this.config.untyped.schema) {\n throw new Error(\n \"Untyped plugin requires a schema path or glob pattern to be specified in the configuration.\"\n );\n }\n\n this.config.untyped.schema = toArray(this.config.untyped.schema).map(\n path => replacePathTokens(this, path)\n );\n\n this.untyped = getGenerateAction(\n this.workspaceConfig as StormWorkspaceConfig\n );\n },\n async prepare() {\n return this.untyped({\n entry: this.config.untyped.schema,\n outputPath: this.config.untyped.outputPath,\n generatedBy: this.config.framework\n });\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAuCA,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,SAAS;IACP,QAAQ;IACR,GAAG;IACJ,EACF;;EAEH,MAAM,iBAAiB;AACrB,OAAI,CAAC,KAAK,OAAO,QAAQ,OACvB,OAAM,IAAI,MACR,8FACD;AAGH,QAAK,OAAO,QAAQ,SAAS,QAAQ,KAAK,OAAO,QAAQ,OAAO,CAAC,KAC/D,SAAQ,kBAAkB,MAAM,KAAK,CACtC;AAED,QAAK,UAAU,kBACb,KAAK,gBACN;;EAEH,MAAM,UAAU;AACd,UAAO,KAAK,QAAQ;IAClB,OAAO,KAAK,OAAO,QAAQ;IAC3B,YAAY,KAAK,OAAO,QAAQ;IAChC,aAAa,KAAK,OAAO;IAC1B,CAAC;;EAEL"}
|
package/dist/types/index.cjs
DELETED
|
File without changes
|
package/dist/types/index.d.cts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig } from "./plugin.cjs";
|
|
2
|
-
export { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig };
|
package/dist/types/index.d.mts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig } from "./plugin.mjs";
|
|
2
|
-
export { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig };
|
package/dist/types/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types/plugin.cjs
DELETED
|
File without changes
|
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
2
|
-
import { getGenerateAction } from "@storm-software/untyped/generate";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
interface UntypedPluginOptions {
|
|
6
|
-
/**
|
|
7
|
-
* A path or glob pattern (or an array of paths and glob patterns) to schemas containing the Untyped type definitions used during generation.
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue "\{root\}/**\/\{untyped.ts,*.untyped.ts\}"
|
|
10
|
-
*/
|
|
11
|
-
schema?: string | string[];
|
|
12
|
-
/**
|
|
13
|
-
* The path for the generated Untyped output files
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* By default, it will generate the output files alongside each schema file.
|
|
17
|
-
*/
|
|
18
|
-
outputPath?: string;
|
|
19
|
-
}
|
|
20
|
-
interface UntypedPluginUserConfig extends UserConfig {
|
|
21
|
-
untyped?: UntypedPluginOptions;
|
|
22
|
-
}
|
|
23
|
-
interface UntypedPluginResolvedConfig extends ResolvedConfig {
|
|
24
|
-
untyped: UntypedPluginOptions;
|
|
25
|
-
}
|
|
26
|
-
interface UntypedPluginContext<TResolvedConfig extends UntypedPluginResolvedConfig = UntypedPluginResolvedConfig> extends PluginContext<TResolvedConfig> {
|
|
27
|
-
untyped: ReturnType<typeof getGenerateAction>;
|
|
28
|
-
}
|
|
29
|
-
declare type __ΩUntypedPluginOptions = any[];
|
|
30
|
-
declare type __ΩUntypedPluginUserConfig = any[];
|
|
31
|
-
declare type __ΩUntypedPluginResolvedConfig = any[];
|
|
32
|
-
declare type __ΩUntypedPluginContext = any[];
|
|
33
|
-
//#endregion
|
|
34
|
-
export { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig };
|
|
35
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UAqBiB,oBAAA;;AAAjB;;;;EAME,MAAA;EAWe;;;;;;EAHf,UAAA;AAAA;AAAA,UAGe,uBAAA,SAAgC,UAAA;EAC/C,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAA;EACnD,OAAA,EAAS,oBAAA;AAAA;AAAA,UAGM,oBAAA,yBACS,2BAAA,GACtB,2BAAA,UACM,aAAA,CAAc,eAAA;EACtB,OAAA,EAAS,UAAA,QAAkB,iBAAA;AAAA;AAAA"}
|
package/dist/types/plugin.d.mts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { getGenerateAction } from "@storm-software/untyped/generate";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
interface UntypedPluginOptions {
|
|
6
|
-
/**
|
|
7
|
-
* A path or glob pattern (or an array of paths and glob patterns) to schemas containing the Untyped type definitions used during generation.
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue "\{root\}/**\/\{untyped.ts,*.untyped.ts\}"
|
|
10
|
-
*/
|
|
11
|
-
schema?: string | string[];
|
|
12
|
-
/**
|
|
13
|
-
* The path for the generated Untyped output files
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* By default, it will generate the output files alongside each schema file.
|
|
17
|
-
*/
|
|
18
|
-
outputPath?: string;
|
|
19
|
-
}
|
|
20
|
-
interface UntypedPluginUserConfig extends UserConfig {
|
|
21
|
-
untyped?: UntypedPluginOptions;
|
|
22
|
-
}
|
|
23
|
-
interface UntypedPluginResolvedConfig extends ResolvedConfig {
|
|
24
|
-
untyped: UntypedPluginOptions;
|
|
25
|
-
}
|
|
26
|
-
interface UntypedPluginContext<TResolvedConfig extends UntypedPluginResolvedConfig = UntypedPluginResolvedConfig> extends PluginContext<TResolvedConfig> {
|
|
27
|
-
untyped: ReturnType<typeof getGenerateAction>;
|
|
28
|
-
}
|
|
29
|
-
declare type __ΩUntypedPluginOptions = any[];
|
|
30
|
-
declare type __ΩUntypedPluginUserConfig = any[];
|
|
31
|
-
declare type __ΩUntypedPluginResolvedConfig = any[];
|
|
32
|
-
declare type __ΩUntypedPluginContext = any[];
|
|
33
|
-
//#endregion
|
|
34
|
-
export { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig };
|
|
35
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UAqBiB,oBAAA;;AAAjB;;;;EAME,MAAA;EAWe;;;;;;EAHf,UAAA;AAAA;AAAA,UAGe,uBAAA,SAAgC,UAAA;EAC/C,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAA;EACnD,OAAA,EAAS,oBAAA;AAAA;AAAA,UAGM,oBAAA,yBACS,2BAAA,GACtB,2BAAA,UACM,aAAA,CAAc,eAAA;EACtB,OAAA,EAAS,UAAA,QAAkB,iBAAA;AAAA;AAAA"}
|
package/dist/types/plugin.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|