@dword-design/base 15.1.6 → 15.2.0

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.
@@ -1,10 +1,18 @@
1
1
  export default function (): ({
2
+ name: string;
3
+ uses: any;
4
+ env?: undefined;
5
+ run?: undefined;
6
+ if?: undefined;
7
+ with?: undefined;
8
+ } | {
2
9
  env: {
3
10
  GH_TOKEN: string;
4
11
  };
5
12
  run: string;
6
- if?: undefined;
13
+ name?: undefined;
7
14
  uses?: undefined;
15
+ if?: undefined;
8
16
  with?: undefined;
9
17
  } | {
10
18
  if: string;
@@ -14,6 +22,7 @@ export default function (): ({
14
22
  name: string;
15
23
  path: string;
16
24
  };
25
+ name?: undefined;
17
26
  env?: undefined;
18
27
  run?: undefined;
19
28
  })[];
@@ -2,6 +2,7 @@ import pathLib from "node:path";
2
2
  import { constantCase } from "change-case";
3
3
  import { findUpStop, findUpSync } from "find-up";
4
4
  import fs from "fs-extra";
5
+ import parsePackagejsonName from "parse-packagejson-name";
5
6
  import gitHubAction from "tagged-template-noop";
6
7
  export default function () {
7
8
  const envSchemaPath = findUpSync(path => {
@@ -15,12 +16,18 @@ export default function () {
15
16
  cwd: this.cwd
16
17
  });
17
18
  const envVariableNames = Object.keys(envSchemaPath ? fs.readJsonSync(envSchemaPath) : {}).map(name => constantCase(name));
18
- return [{
19
+ const packageName = parsePackagejsonName(this.packageConfig.name).fullName;
20
+ return [...(this.config.doppler ? [{
21
+ name: "Install Doppler CLI",
22
+ uses: gitHubAction`dopplerhq/cli-action@v3`
23
+ }] : []), {
19
24
  env: {
20
- ...Object.fromEntries(envVariableNames.map(name => [name, `\${{ secrets.${name} }}`])),
25
+ ...(this.config.doppler ? {
26
+ DOPPLER_TOKEN: "${{ secrets.DOPPLER_TOKEN }}"
27
+ } : Object.fromEntries(envVariableNames.map(name => [name, `\${{ secrets.${name} }}`]))),
21
28
  GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
22
29
  },
23
- run: "pnpm verify"
30
+ run: `${this.config.doppler ? `doppler run -p ${packageName} -c test -- ` : ""}pnpm verify`
24
31
  }, {
25
32
  if: "always()",
26
33
  uses: gitHubAction`actions/upload-artifact@v4`,
package/dist/index.d.ts CHANGED
@@ -49,6 +49,7 @@ type Config = {
49
49
  packageConfig: PackageJson;
50
50
  renovateConfig: RenovateConfig;
51
51
  isLockFileFixCommitType: boolean;
52
+ doppler: boolean;
52
53
  };
53
54
  type PartialConfigObject<TConfig extends Config = Config> = Omit<Partial<TConfig>, 'commands'> & {
54
55
  commands?: Record<string, PartialCommandInObjectWithBase<TConfig>>;
package/dist/index.js CHANGED
@@ -168,6 +168,7 @@ class Base {
168
168
  deployAssets: [],
169
169
  deployEnv: {},
170
170
  deployPlugins: [],
171
+ doppler: false,
171
172
  editorIgnore: [],
172
173
  eslintConfig: "",
173
174
  fetchGitHistory: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base",
3
- "version": "15.1.6",
3
+ "version": "15.2.0",
4
4
  "description": "Base package for projects.",
5
5
  "repository": "dword-design/base",
6
6
  "funding": "https://github.com/sponsors/dword-design",