@powerlines/plugin-pulumi 0.2.36 → 0.2.38

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.
Files changed (40) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +1 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.d.cts +2 -2
  4. package/dist/index.d.mts +3 -2
  5. package/dist/index.mjs +1 -1
  6. package/dist/powerlines/src/plugin-utils/context-helpers.cjs +1 -0
  7. package/dist/powerlines/src/plugin-utils/context-helpers.mjs +1 -0
  8. package/dist/powerlines/src/types/build.d.cts +139 -0
  9. package/dist/powerlines/src/types/build.d.mts +139 -0
  10. package/dist/powerlines/src/types/commands.d.cts +8 -0
  11. package/dist/powerlines/src/types/commands.d.mts +8 -0
  12. package/dist/powerlines/src/types/config.d.cts +345 -0
  13. package/dist/powerlines/src/types/config.d.mts +345 -0
  14. package/dist/powerlines/src/types/context.d.cts +347 -0
  15. package/dist/powerlines/src/types/context.d.mts +347 -0
  16. package/dist/powerlines/src/types/fs.d.cts +458 -0
  17. package/dist/powerlines/src/types/fs.d.mts +458 -0
  18. package/dist/powerlines/src/types/plugin.d.cts +232 -0
  19. package/dist/powerlines/src/types/plugin.d.mts +232 -0
  20. package/dist/powerlines/src/types/resolved.d.cts +81 -0
  21. package/dist/powerlines/src/types/resolved.d.mts +81 -0
  22. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  23. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  24. package/dist/types/index.cjs +0 -1
  25. package/dist/types/index.d.cts +1 -2
  26. package/dist/types/index.d.mts +1 -2
  27. package/dist/types/index.mjs +1 -1
  28. package/dist/types/plugin.cjs +0 -1
  29. package/dist/types/plugin.d.cts +82 -1
  30. package/dist/types/plugin.d.mts +82 -1
  31. package/dist/types/plugin.mjs +1 -1
  32. package/package.json +10 -10
  33. package/dist/index-BgAdqTbb.d.mts +0 -1
  34. package/dist/index-CEgs-Dz2.d.cts +0 -1
  35. package/dist/plugin-B676BSgA.d.mts +0 -1717
  36. package/dist/plugin-Bvn-he2n.mjs +0 -1
  37. package/dist/plugin-DHXHjv16.cjs +0 -0
  38. package/dist/plugin-DQhyMlJq.d.cts +0 -1717
  39. package/dist/types-B7VYa_Pp.mjs +0 -1
  40. package/dist/types-DHkg7xmX.cjs +0 -0
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,`__esModule`,{value:!0});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));require(`./plugin-DHXHjv16.cjs`),require(`./types-DHkg7xmX.cjs`);let c=require(`@pulumi/pulumi/automation`),l=require(`@stryke/helpers/index`),u=require(`@stryke/path/join`),d=require(`@stryke/string-format/kebab-case`),f=require(`defu`);f=s(f);let p=require(`@stryke/type-checks/is-set-object`),m=require(`@stryke/type-checks/is-set-string`);function h(e){let t;return(0,p.isSetObject)(e.workspaceConfig.organization)&&(t=e.workspaceConfig.organization.name),!t&&(0,m.isSetString)(e.workspaceConfig.organization)&&(t=e.workspaceConfig.organization),!t&&Array.isArray(e.packageJson.maintainers)&&e.packageJson.maintainers.length>0&&((0,p.isSetObject)(e.packageJson.maintainers[0])&&(t=e.packageJson.maintainers[0].name),!t&&(0,m.isSetString)(e.packageJson.maintainers[0])&&(t=e.packageJson.maintainers[0])),!t&&Array.isArray(e.packageJson.author)&&e.packageJson.author.length>0&&((0,p.isSetObject)(e.packageJson.author[0])&&(t=e.packageJson.author[0].name),!t&&(0,m.isSetString)(e.packageJson.author[0])&&(t=e.packageJson.author[0])),!t&&Array.isArray(e.packageJson.contributors)&&e.packageJson.contributors.length>0&&((0,p.isSetObject)(e.packageJson.contributors[0])&&(t=e.packageJson.contributors[0].name),!t&&(0,m.isSetString)(e.packageJson.contributors[0])&&(t=e.packageJson.contributors[0])),!t&&(0,m.isSetString)(e.packageJson.namespace)&&(t=e.packageJson.namespace.replace(/^@/,``)),!t&&(0,m.isSetString)(e.packageJson.name)&&(t=e.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),t}function g(e){let t;return(0,m.isSetString)(e.workspaceConfig.name)&&(t=e.workspaceConfig.name),!t&&(0,m.isSetString)(e.workspaceConfig.namespace)&&(t=e.workspaceConfig.namespace.replace(/^@/,``)),!t&&(0,m.isSetString)(e.packageJson.namespace)&&(t=e.packageJson.namespace.replace(/^@/,``)),!t&&(0,m.isSetString)(e.packageJson.name)&&(t=e.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),t}const _=(e={})=>({name:`pulumi`,async config(){return{deploy:{pulumi:(0,f.default)(e,{projectName:this.config.name,workDir:(0,u.joinPaths)(this.artifactsPath,`infrastructure`),settings:{}})}}},async configResolved(){e.stack||(this.config.deploy.pulumi.stackName??=(0,c.fullyQualifiedStackName)((0,d.kebabCase)(h(this)||`default`),`${g(this)?`${(0,d.kebabCase)(g(this))}-`:``}${(0,d.kebabCase)(this.config.name)}`,this.config.mode))},deploy:{order:`post`,async handler(){if(this.info(`Deploying Pulumi stack: ${this.config.deploy.pulumi.stack?.name||this.config.deploy.pulumi.stackName}`),!e.stack&&!e.program&&!e.projectName||!e.workDir)throw Error(`Pulumi plugin requires either an inline program or a working directory to be specified.`);let t=e.stack;t??=await c.LocalWorkspace.createOrSelectStack((0,l.omit)(this.config.deploy.pulumi,[`options`,`settings`])),this.config.deploy.pulumi.settings&&Object.keys(this.config.deploy.pulumi.settings).length>0&&await t.workspace.saveStackSettings(t.name,this.config.deploy.pulumi.settings),await t.refresh({onOutput:this.debug.bind(this)}),this.config.deploy.pulumi.destroy&&await t.destroy({onOutput:this.debug.bind(this)});let n=await t.up({onOutput:this.debug.bind(this)});this.info(`Successfully deployed ${t.name} (v${n.summary.version}): ${n.summary.message}`)}}});var v=_;exports.default=v,exports.plugin=_;
1
+ Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./powerlines/src/plugin-utils/context-helpers.cjs`);let n=require(`@pulumi/pulumi/automation`),r=require(`@stryke/helpers/index`),i=require(`@stryke/path/join`),a=require(`@stryke/string-format/kebab-case`),o=require(`defu`);o=e.__toESM(o);const s=(e={})=>({name:`pulumi`,async config(){return{deploy:{pulumi:(0,o.default)(e,{projectName:this.config.name,workDir:(0,i.joinPaths)(this.artifactsPath,`infrastructure`),settings:{}})}}},async configResolved(){e.stack||(this.config.deploy.pulumi.stackName??=(0,n.fullyQualifiedStackName)((0,a.kebabCase)(t.getOrganizationName(this)||`default`),`${t.getWorkspaceName(this)?`${(0,a.kebabCase)(t.getWorkspaceName(this))}-`:``}${(0,a.kebabCase)(this.config.name)}`,this.config.mode))},deploy:{order:`post`,async handler(){if(this.info(`Deploying Pulumi stack: ${this.config.deploy.pulumi.stack?.name||this.config.deploy.pulumi.stackName}`),!e.stack&&!e.program&&!e.projectName||!e.workDir)throw Error(`Pulumi plugin requires either an inline program or a working directory to be specified.`);let t=e.stack;t??=await n.LocalWorkspace.createOrSelectStack((0,r.omit)(this.config.deploy.pulumi,[`options`,`settings`])),this.config.deploy.pulumi.settings&&Object.keys(this.config.deploy.pulumi.settings).length>0&&await t.workspace.saveStackSettings(t.name,this.config.deploy.pulumi.settings),await t.refresh({onOutput:this.debug.bind(this)}),this.config.deploy.pulumi.destroy&&await t.destroy({onOutput:this.debug.bind(this)});let i=await t.up({onOutput:this.debug.bind(this)});this.info(`Successfully deployed ${t.name} (v${i.summary.version}): ${i.summary.message}`)}}});var c=s;exports.default=c,exports.plugin=s;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Plugin, S as __ΩPulumiPluginUserConfig, _ as __ΩPulumiPluginDeployConfig, a as PulumiPluginCreateStackOptions, b as __ΩPulumiPluginResolvedConfig, c as PulumiPluginOptions, d as PulumiPluginUserConfig, f as __ΩPulumiPluginBaseOptions, g as __ΩPulumiPluginCreateStackOptions, h as __ΩPulumiPluginCreateStackLocalOptions, i as PulumiPluginCreateStackLocalOptions, l as PulumiPluginResolvedConfig, m as __ΩPulumiPluginCreateStackInlineOptions, n as PulumiPluginContext, o as PulumiPluginDeployConfig, p as __ΩPulumiPluginContext, r as PulumiPluginCreateStackInlineOptions, s as PulumiPluginExistingStackOptions, t as PulumiPluginBaseOptions, u as PulumiPluginResolvedOptions, v as __ΩPulumiPluginExistingStackOptions, x as __ΩPulumiPluginResolvedOptions, y as __ΩPulumiPluginOptions } from "./plugin-DQhyMlJq.cjs";
2
- import "./index-CEgs-Dz2.cjs";
1
+ import { Plugin } from "./powerlines/src/types/plugin.cjs";
2
+ import { PulumiPluginBaseOptions, PulumiPluginContext, PulumiPluginCreateStackInlineOptions, PulumiPluginCreateStackLocalOptions, PulumiPluginCreateStackOptions, PulumiPluginDeployConfig, PulumiPluginExistingStackOptions, PulumiPluginOptions, PulumiPluginResolvedConfig, PulumiPluginResolvedOptions, PulumiPluginUserConfig, __ΩPulumiPluginBaseOptions, __ΩPulumiPluginContext, __ΩPulumiPluginCreateStackInlineOptions, __ΩPulumiPluginCreateStackLocalOptions, __ΩPulumiPluginCreateStackOptions, __ΩPulumiPluginDeployConfig, __ΩPulumiPluginExistingStackOptions, __ΩPulumiPluginOptions, __ΩPulumiPluginResolvedConfig, __ΩPulumiPluginResolvedOptions, __ΩPulumiPluginUserConfig } from "./types/plugin.cjs";
3
3
 
4
4
  //#region src/index.d.ts
5
5
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { C as Plugin, S as __ΩPulumiPluginUserConfig, _ as __ΩPulumiPluginDeployConfig, a as PulumiPluginCreateStackOptions, b as __ΩPulumiPluginResolvedConfig, c as PulumiPluginOptions, d as PulumiPluginUserConfig, f as __ΩPulumiPluginBaseOptions, g as __ΩPulumiPluginCreateStackOptions, h as __ΩPulumiPluginCreateStackLocalOptions, i as PulumiPluginCreateStackLocalOptions, l as PulumiPluginResolvedConfig, m as __ΩPulumiPluginCreateStackInlineOptions, n as PulumiPluginContext, o as PulumiPluginDeployConfig, p as __ΩPulumiPluginContext, r as PulumiPluginCreateStackInlineOptions, s as PulumiPluginExistingStackOptions, t as PulumiPluginBaseOptions, u as PulumiPluginResolvedOptions, v as __ΩPulumiPluginExistingStackOptions, x as __ΩPulumiPluginResolvedOptions, y as __ΩPulumiPluginOptions } from "./plugin-B676BSgA.mjs";
2
- import "./index-BgAdqTbb.mjs";
1
+ import { Plugin } from "./powerlines/src/types/plugin.mjs";
2
+ import { PulumiPluginBaseOptions, PulumiPluginContext, PulumiPluginCreateStackInlineOptions, PulumiPluginCreateStackLocalOptions, PulumiPluginCreateStackOptions, PulumiPluginDeployConfig, PulumiPluginExistingStackOptions, PulumiPluginOptions, PulumiPluginResolvedConfig, PulumiPluginResolvedOptions, PulumiPluginUserConfig, __ΩPulumiPluginBaseOptions, __ΩPulumiPluginContext, __ΩPulumiPluginCreateStackInlineOptions, __ΩPulumiPluginCreateStackLocalOptions, __ΩPulumiPluginCreateStackOptions, __ΩPulumiPluginDeployConfig, __ΩPulumiPluginExistingStackOptions, __ΩPulumiPluginOptions, __ΩPulumiPluginResolvedConfig, __ΩPulumiPluginResolvedOptions, __ΩPulumiPluginUserConfig } from "./types/plugin.mjs";
3
+ import "./types/index.mjs";
3
4
 
4
5
  //#region src/index.d.ts
5
6
 
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import"./plugin-Bvn-he2n.mjs";import"./types-B7VYa_Pp.mjs";import{LocalWorkspace as e,fullyQualifiedStackName as t}from"@pulumi/pulumi/automation";import{omit as n}from"@stryke/helpers/index";import{joinPaths as r}from"@stryke/path/join";import{kebabCase as i}from"@stryke/string-format/kebab-case";import a from"defu";import{isSetObject as o}from"@stryke/type-checks/is-set-object";import{isSetString as s}from"@stryke/type-checks/is-set-string";function c(e){let t;return o(e.workspaceConfig.organization)&&(t=e.workspaceConfig.organization.name),!t&&s(e.workspaceConfig.organization)&&(t=e.workspaceConfig.organization),!t&&Array.isArray(e.packageJson.maintainers)&&e.packageJson.maintainers.length>0&&(o(e.packageJson.maintainers[0])&&(t=e.packageJson.maintainers[0].name),!t&&s(e.packageJson.maintainers[0])&&(t=e.packageJson.maintainers[0])),!t&&Array.isArray(e.packageJson.author)&&e.packageJson.author.length>0&&(o(e.packageJson.author[0])&&(t=e.packageJson.author[0].name),!t&&s(e.packageJson.author[0])&&(t=e.packageJson.author[0])),!t&&Array.isArray(e.packageJson.contributors)&&e.packageJson.contributors.length>0&&(o(e.packageJson.contributors[0])&&(t=e.packageJson.contributors[0].name),!t&&s(e.packageJson.contributors[0])&&(t=e.packageJson.contributors[0])),!t&&s(e.packageJson.namespace)&&(t=e.packageJson.namespace.replace(/^@/,``)),!t&&s(e.packageJson.name)&&(t=e.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),t}function l(e){let t;return s(e.workspaceConfig.name)&&(t=e.workspaceConfig.name),!t&&s(e.workspaceConfig.namespace)&&(t=e.workspaceConfig.namespace.replace(/^@/,``)),!t&&s(e.packageJson.namespace)&&(t=e.packageJson.namespace.replace(/^@/,``)),!t&&s(e.packageJson.name)&&(t=e.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),t}const u=(o={})=>({name:`pulumi`,async config(){return{deploy:{pulumi:a(o,{projectName:this.config.name,workDir:r(this.artifactsPath,`infrastructure`),settings:{}})}}},async configResolved(){o.stack||(this.config.deploy.pulumi.stackName??=t(i(c(this)||`default`),`${l(this)?`${i(l(this))}-`:``}${i(this.config.name)}`,this.config.mode))},deploy:{order:`post`,async handler(){if(this.info(`Deploying Pulumi stack: ${this.config.deploy.pulumi.stack?.name||this.config.deploy.pulumi.stackName}`),!o.stack&&!o.program&&!o.projectName||!o.workDir)throw Error(`Pulumi plugin requires either an inline program or a working directory to be specified.`);let t=o.stack;t??=await e.createOrSelectStack(n(this.config.deploy.pulumi,[`options`,`settings`])),this.config.deploy.pulumi.settings&&Object.keys(this.config.deploy.pulumi.settings).length>0&&await t.workspace.saveStackSettings(t.name,this.config.deploy.pulumi.settings),await t.refresh({onOutput:this.debug.bind(this)}),this.config.deploy.pulumi.destroy&&await t.destroy({onOutput:this.debug.bind(this)});let r=await t.up({onOutput:this.debug.bind(this)});this.info(`Successfully deployed ${t.name} (v${r.summary.version}): ${r.summary.message}`)}}});var d=u;export{d as default,u as plugin};
1
+ import{getOrganizationName as e,getWorkspaceName as t}from"./powerlines/src/plugin-utils/context-helpers.mjs";import{LocalWorkspace as n,fullyQualifiedStackName as r}from"@pulumi/pulumi/automation";import{omit as i}from"@stryke/helpers/index";import{joinPaths as a}from"@stryke/path/join";import{kebabCase as o}from"@stryke/string-format/kebab-case";import s from"defu";const c=(c={})=>({name:`pulumi`,async config(){return{deploy:{pulumi:s(c,{projectName:this.config.name,workDir:a(this.artifactsPath,`infrastructure`),settings:{}})}}},async configResolved(){c.stack||(this.config.deploy.pulumi.stackName??=r(o(e(this)||`default`),`${t(this)?`${o(t(this))}-`:``}${o(this.config.name)}`,this.config.mode))},deploy:{order:`post`,async handler(){if(this.info(`Deploying Pulumi stack: ${this.config.deploy.pulumi.stack?.name||this.config.deploy.pulumi.stackName}`),!c.stack&&!c.program&&!c.projectName||!c.workDir)throw Error(`Pulumi plugin requires either an inline program or a working directory to be specified.`);let e=c.stack;e??=await n.createOrSelectStack(i(this.config.deploy.pulumi,[`options`,`settings`])),this.config.deploy.pulumi.settings&&Object.keys(this.config.deploy.pulumi.settings).length>0&&await e.workspace.saveStackSettings(e.name,this.config.deploy.pulumi.settings),await e.refresh({onOutput:this.debug.bind(this)}),this.config.deploy.pulumi.destroy&&await e.destroy({onOutput:this.debug.bind(this)});let t=await e.up({onOutput:this.debug.bind(this)});this.info(`Successfully deployed ${e.name} (v${t.summary.version}): ${t.summary.message}`)}}});var l=c;export{l as default,c as plugin};
@@ -0,0 +1 @@
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/type-checks/is-set-object`),n=require(`@stryke/type-checks/is-set-string`);function r(e){let r;return(0,t.isSetObject)(e.workspaceConfig.organization)&&(r=e.workspaceConfig.organization.name),!r&&(0,n.isSetString)(e.workspaceConfig.organization)&&(r=e.workspaceConfig.organization),!r&&Array.isArray(e.packageJson.maintainers)&&e.packageJson.maintainers.length>0&&((0,t.isSetObject)(e.packageJson.maintainers[0])&&(r=e.packageJson.maintainers[0].name),!r&&(0,n.isSetString)(e.packageJson.maintainers[0])&&(r=e.packageJson.maintainers[0])),!r&&Array.isArray(e.packageJson.author)&&e.packageJson.author.length>0&&((0,t.isSetObject)(e.packageJson.author[0])&&(r=e.packageJson.author[0].name),!r&&(0,n.isSetString)(e.packageJson.author[0])&&(r=e.packageJson.author[0])),!r&&Array.isArray(e.packageJson.contributors)&&e.packageJson.contributors.length>0&&((0,t.isSetObject)(e.packageJson.contributors[0])&&(r=e.packageJson.contributors[0].name),!r&&(0,n.isSetString)(e.packageJson.contributors[0])&&(r=e.packageJson.contributors[0])),!r&&(0,n.isSetString)(e.packageJson.namespace)&&(r=e.packageJson.namespace.replace(/^@/,``)),!r&&(0,n.isSetString)(e.packageJson.name)&&(r=e.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),r}function i(e){let t;return(0,n.isSetString)(e.workspaceConfig.name)&&(t=e.workspaceConfig.name),!t&&(0,n.isSetString)(e.workspaceConfig.namespace)&&(t=e.workspaceConfig.namespace.replace(/^@/,``)),!t&&(0,n.isSetString)(e.packageJson.namespace)&&(t=e.packageJson.namespace.replace(/^@/,``)),!t&&(0,n.isSetString)(e.packageJson.name)&&(t=e.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),t}exports.getOrganizationName=r,exports.getWorkspaceName=i;
@@ -0,0 +1 @@
1
+ import{isSetObject as e}from"@stryke/type-checks/is-set-object";import{isSetString as t}from"@stryke/type-checks/is-set-string";function n(n){let r;return e(n.workspaceConfig.organization)&&(r=n.workspaceConfig.organization.name),!r&&t(n.workspaceConfig.organization)&&(r=n.workspaceConfig.organization),!r&&Array.isArray(n.packageJson.maintainers)&&n.packageJson.maintainers.length>0&&(e(n.packageJson.maintainers[0])&&(r=n.packageJson.maintainers[0].name),!r&&t(n.packageJson.maintainers[0])&&(r=n.packageJson.maintainers[0])),!r&&Array.isArray(n.packageJson.author)&&n.packageJson.author.length>0&&(e(n.packageJson.author[0])&&(r=n.packageJson.author[0].name),!r&&t(n.packageJson.author[0])&&(r=n.packageJson.author[0])),!r&&Array.isArray(n.packageJson.contributors)&&n.packageJson.contributors.length>0&&(e(n.packageJson.contributors[0])&&(r=n.packageJson.contributors[0].name),!r&&t(n.packageJson.contributors[0])&&(r=n.packageJson.contributors[0])),!r&&t(n.packageJson.namespace)&&(r=n.packageJson.namespace.replace(/^@/,``)),!r&&t(n.packageJson.name)&&(r=n.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),r}function r(e){let n;return t(e.workspaceConfig.name)&&(n=e.workspaceConfig.name),!n&&t(e.workspaceConfig.namespace)&&(n=e.workspaceConfig.namespace.replace(/^@/,``)),!n&&t(e.packageJson.namespace)&&(n=e.packageJson.namespace.replace(/^@/,``)),!n&&t(e.packageJson.name)&&(n=e.packageJson.name.replace(/^@/,``).replace(/\/.*$/,``)),n}export{n as getOrganizationName,r as getWorkspaceName};
@@ -0,0 +1,139 @@
1
+ //#region ../powerlines/src/types/build.d.ts
2
+
3
+ type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
4
+ interface BuildConfig {
5
+ /**
6
+ * The platform to build the project for
7
+ *
8
+ * @defaultValue "neutral"
9
+ */
10
+ platform?: "node" | "browser" | "neutral";
11
+ /**
12
+ * Array of strings indicating the polyfills to include for the build.
13
+ *
14
+ * @remarks
15
+ * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * {
20
+ * polyfill: ['{projectRoot}/custom-polyfill.ts']
21
+ * }
22
+ * ```
23
+ */
24
+ polyfill?: string[];
25
+ /**
26
+ * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
27
+ *
28
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
29
+ */
30
+ mainFields?: string[];
31
+ /**
32
+ * Array of strings indicating what conditions should be used for module resolution.
33
+ */
34
+ conditions?: string[];
35
+ /**
36
+ * Array of strings indicating what file extensions should be used for module resolution.
37
+ *
38
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
39
+ */
40
+ extensions?: string[];
41
+ /**
42
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
43
+ *
44
+ * @remarks
45
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
46
+ */
47
+ dedupe?: string[];
48
+ /**
49
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
50
+ */
51
+ builtins?: (string | RegExp)[];
52
+ /**
53
+ * Define global variable replacements.
54
+ *
55
+ * @remarks
56
+ * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * {
61
+ * define: {
62
+ * __VERSION__: '"1.0.0"',
63
+ * __DEV__: 'process.env.NODE_ENV !== "production"'
64
+ * }
65
+ * }
66
+ * ```
67
+ *
68
+ * @see https://esbuild.github.io/api/#define
69
+ * @see https://vitejs.dev/config/build-options.html#define
70
+ * @see https://github.com/rollup/plugins/tree/master/packages/replace
71
+ */
72
+ define?: Record<string, any>;
73
+ /**
74
+ * Global variables that will have import statements injected where necessary
75
+ *
76
+ * @remarks
77
+ * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * {
82
+ * inject: {
83
+ * process: 'process/browser',
84
+ * Buffer: ['buffer', 'Buffer'],
85
+ * }
86
+ * }
87
+ * ```
88
+ *
89
+ * @see https://github.com/rollup/plugins/tree/master/packages/inject
90
+ */
91
+ inject?: Record<string, string | string[]>;
92
+ /**
93
+ * The alias mappings to use for module resolution during the build process.
94
+ *
95
+ * @remarks
96
+ * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * {
101
+ * alias: {
102
+ * "@utils": "./src/utils",
103
+ * "@components": "./src/components"
104
+ * }
105
+ * }
106
+ * ```
107
+ *
108
+ * @see https://github.com/rollup/plugins/tree/master/packages/alias
109
+ */
110
+ alias?: Record<string, string> | Array<{
111
+ find: string | RegExp;
112
+ replacement: string;
113
+ }>;
114
+ /**
115
+ * A list of modules that should not be bundled, even if they are external dependencies.
116
+ *
117
+ * @remarks
118
+ * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
119
+ */
120
+ external?: (string | RegExp)[];
121
+ /**
122
+ * A list of modules that should always be bundled, even if they are external dependencies.
123
+ */
124
+ noExternal?: (string | RegExp)[];
125
+ /**
126
+ * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
127
+ */
128
+ skipNodeModulesBundle?: boolean;
129
+ /**
130
+ * An optional set of override options to apply to the selected build variant.
131
+ *
132
+ * @remarks
133
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
134
+ */
135
+ override?: Record<string, any>;
136
+ }
137
+ type BuildResolvedConfig = Omit<BuildConfig, "override">;
138
+ //#endregion
139
+ export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
@@ -0,0 +1,139 @@
1
+ //#region ../powerlines/src/types/build.d.ts
2
+
3
+ type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
4
+ interface BuildConfig {
5
+ /**
6
+ * The platform to build the project for
7
+ *
8
+ * @defaultValue "neutral"
9
+ */
10
+ platform?: "node" | "browser" | "neutral";
11
+ /**
12
+ * Array of strings indicating the polyfills to include for the build.
13
+ *
14
+ * @remarks
15
+ * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * {
20
+ * polyfill: ['{projectRoot}/custom-polyfill.ts']
21
+ * }
22
+ * ```
23
+ */
24
+ polyfill?: string[];
25
+ /**
26
+ * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
27
+ *
28
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
29
+ */
30
+ mainFields?: string[];
31
+ /**
32
+ * Array of strings indicating what conditions should be used for module resolution.
33
+ */
34
+ conditions?: string[];
35
+ /**
36
+ * Array of strings indicating what file extensions should be used for module resolution.
37
+ *
38
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
39
+ */
40
+ extensions?: string[];
41
+ /**
42
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
43
+ *
44
+ * @remarks
45
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
46
+ */
47
+ dedupe?: string[];
48
+ /**
49
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
50
+ */
51
+ builtins?: (string | RegExp)[];
52
+ /**
53
+ * Define global variable replacements.
54
+ *
55
+ * @remarks
56
+ * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * {
61
+ * define: {
62
+ * __VERSION__: '"1.0.0"',
63
+ * __DEV__: 'process.env.NODE_ENV !== "production"'
64
+ * }
65
+ * }
66
+ * ```
67
+ *
68
+ * @see https://esbuild.github.io/api/#define
69
+ * @see https://vitejs.dev/config/build-options.html#define
70
+ * @see https://github.com/rollup/plugins/tree/master/packages/replace
71
+ */
72
+ define?: Record<string, any>;
73
+ /**
74
+ * Global variables that will have import statements injected where necessary
75
+ *
76
+ * @remarks
77
+ * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * {
82
+ * inject: {
83
+ * process: 'process/browser',
84
+ * Buffer: ['buffer', 'Buffer'],
85
+ * }
86
+ * }
87
+ * ```
88
+ *
89
+ * @see https://github.com/rollup/plugins/tree/master/packages/inject
90
+ */
91
+ inject?: Record<string, string | string[]>;
92
+ /**
93
+ * The alias mappings to use for module resolution during the build process.
94
+ *
95
+ * @remarks
96
+ * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * {
101
+ * alias: {
102
+ * "@utils": "./src/utils",
103
+ * "@components": "./src/components"
104
+ * }
105
+ * }
106
+ * ```
107
+ *
108
+ * @see https://github.com/rollup/plugins/tree/master/packages/alias
109
+ */
110
+ alias?: Record<string, string> | Array<{
111
+ find: string | RegExp;
112
+ replacement: string;
113
+ }>;
114
+ /**
115
+ * A list of modules that should not be bundled, even if they are external dependencies.
116
+ *
117
+ * @remarks
118
+ * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
119
+ */
120
+ external?: (string | RegExp)[];
121
+ /**
122
+ * A list of modules that should always be bundled, even if they are external dependencies.
123
+ */
124
+ noExternal?: (string | RegExp)[];
125
+ /**
126
+ * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
127
+ */
128
+ skipNodeModulesBundle?: boolean;
129
+ /**
130
+ * An optional set of override options to apply to the selected build variant.
131
+ *
132
+ * @remarks
133
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
134
+ */
135
+ override?: Record<string, any>;
136
+ }
137
+ type BuildResolvedConfig = Omit<BuildConfig, "override">;
138
+ //#endregion
139
+ export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
@@ -0,0 +1,8 @@
1
+ import { ArrayValues } from "@stryke/types/array";
2
+ import { MaybePromise } from "@stryke/types/base";
3
+
4
+ //#region ../powerlines/src/types/commands.d.ts
5
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
6
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
7
+ //#endregion
8
+ export { CommandType };
@@ -0,0 +1,8 @@
1
+ import { ArrayValues } from "@stryke/types/array";
2
+ import { MaybePromise } from "@stryke/types/base";
3
+
4
+ //#region ../powerlines/src/types/commands.d.ts
5
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
6
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
7
+ //#endregion
8
+ export { CommandType };