@powerlines/plugin-untyped 0.2.17 → 0.2.19

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/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,`__esModule`,{value:!0});let e=require(`@storm-software/untyped/generate`),t=require(`@stryke/convert/to-array`),n=require(`packages/powerlines/dist/plugin-utils/paths`);const r=(r={})=>({name:`untyped`,config(){return{untyped:{schema:`{projectRoot}/**/{untyped.ts,*.untyped.ts}`,...r}}},async configResolved(){if(!this.config.untyped.schema)throw Error(`Untyped plugin requires a schema path or glob pattern to be specified in the configuration.`);this.config.untyped.schema=(0,t.toArray)(this.config.untyped.schema).map(e=>(0,n.replacePathTokens)(this,e)),this.untyped??=(0,e.getGenerateAction)(this.workspaceConfig)},async prepare(){return this.untyped({entry:this.config.untyped.schema,outputPath:this.config.untyped.outputPath,generatedBy:this.config.framework})}});var i=r;exports.default=i,exports.plugin=r;
1
+ Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./powerlines/src/plugin-utils/paths.cjs`);let t=require(`@storm-software/untyped/generate`),n=require(`@stryke/convert/to-array`);const r=(r={})=>({name:`untyped`,config(){return{untyped:{schema:`{projectRoot}/**/{untyped.ts,*.untyped.ts}`,...r}}},async configResolved(){if(!this.config.untyped.schema)throw Error(`Untyped plugin requires a schema path or glob pattern to be specified in the configuration.`);this.config.untyped.schema=(0,n.toArray)(this.config.untyped.schema).map(t=>e.replacePathTokens(this,t)),this.untyped??=(0,t.getGenerateAction)(this.workspaceConfig)},async prepare(){return this.untyped({entry:this.config.untyped.schema,outputPath:this.config.untyped.outputPath,generatedBy:this.config.framework})}});var i=r;exports.default=i,exports.plugin=r;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{getGenerateAction as e}from"@storm-software/untyped/generate";import{toArray as t}from"@stryke/convert/to-array";import{replacePathTokens as n}from"packages/powerlines/dist/plugin-utils/paths";const r=(r={})=>({name:`untyped`,config(){return{untyped:{schema:`{projectRoot}/**/{untyped.ts,*.untyped.ts}`,...r}}},async configResolved(){if(!this.config.untyped.schema)throw Error(`Untyped plugin requires a schema path or glob pattern to be specified in the configuration.`);this.config.untyped.schema=t(this.config.untyped.schema).map(e=>n(this,e)),this.untyped??=e(this.workspaceConfig)},async prepare(){return this.untyped({entry:this.config.untyped.schema,outputPath:this.config.untyped.outputPath,generatedBy:this.config.framework})}});var i=r;export{i as default,r as plugin};
1
+ import{replacePathTokens as e}from"./powerlines/src/plugin-utils/paths.mjs";import{getGenerateAction as t}from"@storm-software/untyped/generate";import{toArray as n}from"@stryke/convert/to-array";const r=(r={})=>({name:`untyped`,config(){return{untyped:{schema:`{projectRoot}/**/{untyped.ts,*.untyped.ts}`,...r}}},async configResolved(){if(!this.config.untyped.schema)throw Error(`Untyped plugin requires a schema path or glob pattern to be specified in the configuration.`);this.config.untyped.schema=n(this.config.untyped.schema).map(t=>e(this,t)),this.untyped??=t(this.workspaceConfig)},async prepare(){return this.untyped({entry:this.config.untyped.schema,outputPath:this.config.untyped.outputPath,generatedBy:this.config.framework})}});var i=r;export{i as default,r as plugin};
@@ -0,0 +1 @@
1
+ let e=require(`@stryke/path/replace`);function t(t,n){return n&&n.replaceAll(`{workspaceRoot}`,t.workspaceConfig.workspaceRoot).replaceAll(`{root}`,t.config.projectRoot).replaceAll(`{projectRoot}`,t.config.projectRoot).replaceAll(`{sourceRoot}`,t.config.sourceRoot).replaceAll(`{powerlinesPath}`,t.powerlinesPath).replaceAll(`{cachePath}`,t.cachePath).replaceAll(`{dataPath}`,t.dataPath).replaceAll(`{logPath}`,t.envPaths.log).replaceAll(`{tempPath}`,t.envPaths.temp).replaceAll(`{configPath}`,t.envPaths.config).replaceAll(`{outputPath}`,t.config.output.outputPath).replaceAll(`{buildPath}`,t.config.output.buildPath).replaceAll(`{artifactsPath}`,(0,e.replacePath)(t.artifactsPath,t.workspaceConfig.workspaceRoot)).replaceAll(`{builtinPath}`,(0,e.replacePath)(t.builtinsPath,t.workspaceConfig.workspaceRoot)).replaceAll(`{entryPath}`,(0,e.replacePath)(t.entryPath,t.workspaceConfig.workspaceRoot))}exports.replacePathTokens=t;
@@ -0,0 +1 @@
1
+ import{replacePath as e}from"@stryke/path/replace";function t(t,n){return n&&n.replaceAll(`{workspaceRoot}`,t.workspaceConfig.workspaceRoot).replaceAll(`{root}`,t.config.projectRoot).replaceAll(`{projectRoot}`,t.config.projectRoot).replaceAll(`{sourceRoot}`,t.config.sourceRoot).replaceAll(`{powerlinesPath}`,t.powerlinesPath).replaceAll(`{cachePath}`,t.cachePath).replaceAll(`{dataPath}`,t.dataPath).replaceAll(`{logPath}`,t.envPaths.log).replaceAll(`{tempPath}`,t.envPaths.temp).replaceAll(`{configPath}`,t.envPaths.config).replaceAll(`{outputPath}`,t.config.output.outputPath).replaceAll(`{buildPath}`,t.config.output.buildPath).replaceAll(`{artifactsPath}`,e(t.artifactsPath,t.workspaceConfig.workspaceRoot)).replaceAll(`{builtinPath}`,e(t.builtinsPath,t.workspaceConfig.workspaceRoot)).replaceAll(`{entryPath}`,e(t.entryPath,t.workspaceConfig.workspaceRoot))}export{t as replacePathTokens};
@@ -25,9 +25,9 @@ interface UntypedPluginUserConfig extends UserConfig {
25
25
  interface UntypedPluginResolvedConfig extends ResolvedConfig {
26
26
  untyped: UntypedPluginOptions;
27
27
  }
28
- type UntypedPluginContext<TResolvedConfig extends UntypedPluginResolvedConfig = UntypedPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
28
+ interface UntypedPluginContext<TResolvedConfig extends UntypedPluginResolvedConfig = UntypedPluginResolvedConfig> extends PluginContext<TResolvedConfig> {
29
29
  untyped: ReturnType<typeof getGenerateAction>;
30
- };
30
+ }
31
31
  declare type __ΩUntypedPluginOptions = any[];
32
32
  declare type __ΩUntypedPluginUserConfig = any[];
33
33
  declare type __ΩUntypedPluginResolvedConfig = any[];
@@ -25,9 +25,9 @@ interface UntypedPluginUserConfig extends UserConfig {
25
25
  interface UntypedPluginResolvedConfig extends ResolvedConfig {
26
26
  untyped: UntypedPluginOptions;
27
27
  }
28
- type UntypedPluginContext<TResolvedConfig extends UntypedPluginResolvedConfig = UntypedPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
28
+ interface UntypedPluginContext<TResolvedConfig extends UntypedPluginResolvedConfig = UntypedPluginResolvedConfig> extends PluginContext<TResolvedConfig> {
29
29
  untyped: ReturnType<typeof getGenerateAction>;
30
- };
30
+ }
31
31
  declare type __ΩUntypedPluginOptions = any[];
32
32
  declare type __ΩUntypedPluginUserConfig = any[];
33
33
  declare type __ΩUntypedPluginResolvedConfig = any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-untyped",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to use Untyped for code generation based on user-defined schemas.",
6
6
  "repository": {
@@ -130,5 +130,5 @@
130
130
  "@types/node": "^24.10.4"
131
131
  },
132
132
  "publishConfig": { "access": "public" },
133
- "gitHead": "2be7f48c0af42eabb937080f6c98b01ab8184e57"
133
+ "gitHead": "76cadafd65f99178c46aaa01c8cfe0adeae23a09"
134
134
  }