@datapos/datapos-development 0.3.220 → 0.3.222

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.
@@ -7650,7 +7650,7 @@ async function Nh() {
7650
7650
  function Ne(e) {
7651
7651
  const t = "\x1B[36m", i = "\x1B[0m", s = "─".repeat(e.length + 10);
7652
7652
  console.info(`
7653
- ${t}${s}`), console.info(`🚀 ${e}`), console.info(`${s}${i}`);
7653
+ ${t}${s}`), console.info(`â–ļī¸ ${e}`), console.info(`${s}${i}`);
7654
7654
  }
7655
7655
  function Ve(e) {
7656
7656
  console.info(`
@@ -7659,7 +7659,7 @@ function Ve(e) {
7659
7659
  }
7660
7660
  function We(e) {
7661
7661
  console.info(`
7662
- â–ļī¸ ${e}`);
7662
+ ${e}`);
7663
7663
  }
7664
7664
  async function St(e) {
7665
7665
  return JSON.parse(await $.readFile(e, "utf8"));
@@ -7667,10 +7667,10 @@ async function St(e) {
7667
7667
  async function li(e) {
7668
7668
  return await $.readFile(e, "utf8");
7669
7669
  }
7670
- async function Ae(e, t = [], i = !1) {
7671
- return We(`Spawn command: ${e} ${t.join(" ")}`), new Promise((s, a) => {
7672
- Nr(e, t, { stdio: "inherit" }).on("close", (h) => {
7673
- h === 0 || i ? s() : a(new Error(`${e} exited with code ${h}`));
7670
+ async function Ae(e, t, i = [], s = !1) {
7671
+ return We(`${e}. Spawn command: ${t} ${i.join(" ")}`), new Promise((a, o) => {
7672
+ Nr(t, i, { stdio: "inherit" }).on("close", (d) => {
7673
+ d === 0 || s ? a() : o(new Error(`${t} exited with code ${d}`));
7674
7674
  });
7675
7675
  });
7676
7676
  }
@@ -7695,62 +7695,62 @@ async function Tr(e, t) {
7695
7695
  }
7696
7696
  async function $h() {
7697
7697
  try {
7698
- Ne("Build Artifact"), await Ae("vite", ["build"]), Ve("Artifact built.");
7698
+ Ne("Build Project"), await Ae("", "vite", ["build"]), Ve("Project built.");
7699
7699
  } catch (e) {
7700
- console.error("❌ Error building artifact.", e), process.exit(1);
7700
+ console.error("❌ Error building project.", e), process.exit(1);
7701
7701
  }
7702
7702
  }
7703
7703
  async function Uh(e = !1) {
7704
7704
  try {
7705
- Ne("Release Artifact");
7705
+ Ne("Release Project");
7706
7706
  const t = await St("package.json");
7707
- await _r(t), await Lh(t), await Ae("vite", ["build"]), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${t.version}"`]), await _e("git", ["push", "origin", "main:main"]), await Ae("npm", ["publish", "--access", "public"]), Ve(`Artifact version ${t.version} released.`);
7707
+ await _r(t), await Lh(t), await Ae("1ī¸âƒŖ Bundle project.", "vite", ["build"]), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${t.version}"`]), await _e("git", ["push", "origin", "main:main"]), await Ae("", "npm", ["publish", "--access", "public"]), Ve(`Project version ${t.version} released.`);
7708
7708
  } catch (t) {
7709
- console.error("❌ Error releasing artifact.", t), process.exit(1);
7709
+ console.error("❌ Error releasing project.", t), process.exit(1);
7710
7710
  }
7711
7711
  }
7712
7712
  async function Zh() {
7713
7713
  try {
7714
- Ne("Synchronise Artifact with GitHub");
7714
+ Ne("Synchronise Project with GitHub");
7715
7715
  const e = await St("package.json");
7716
- We("Bump artifact version"), await _r(e), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${e.version}"`]), await _e("git", ["push", "origin", "main:main"]), Ve(`Artifact version ${e.version} synchronised with GitHub.`);
7716
+ We("Bump project version"), await _r(e), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${e.version}"`]), await _e("git", ["push", "origin", "main:main"]), Ve(`Project version ${e.version} synchronised with GitHub.`);
7717
7717
  } catch (e) {
7718
- console.error("❌ Error synchronising artifact with GitHub.", e), process.exit(1);
7718
+ console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
7719
7719
  }
7720
7720
  }
7721
7721
  function qh() {
7722
7722
  try {
7723
- Ne("Test Artifact"), console.log(`
7724
- ❌ Test artifact is not implemented. No vitest command.
7723
+ Ne("Test Project"), console.log(`
7724
+ ❌ Test project is not implemented. No 'vitest' command.
7725
7725
  `);
7726
7726
  } catch (e) {
7727
- console.error("❌ Error testing artifact.", e), process.exit(1);
7727
+ console.error("❌ Error testing project.", e), process.exit(1);
7728
7728
  }
7729
7729
  }
7730
7730
  async function Lh(e) {
7731
- We("Build artifact configuration");
7731
+ We("Build project configuration");
7732
7732
  const t = await St("config.json");
7733
7733
  e.name != null && (t.id = e.name.replace("@datapos/", "").replace("@data-positioning/", "")), e.version != null && (t.version = e.version), await di("config.json", t), console.info("✅ Configuration built.");
7734
7734
  }
7735
7735
  async function _r(e, t = "./") {
7736
- if (We("Bump artifact version"), e.version == null)
7737
- e.version = "0.0.001", console.warn(`âš ī¸ Artifact version initialised to ${e.version}.`), await di(`${t}package.json`, e);
7736
+ if (We("Bump project version"), e.version == null)
7737
+ e.version = "0.0.001", console.warn(`âš ī¸ Project version initialised to ${e.version}.`), await di(`${t}package.json`, e);
7738
7738
  else {
7739
7739
  const i = e.version, s = e.version.split(".");
7740
- e.version = `${s[0]}.${s[1]}.${Number(s[2]) + 1}`, console.info(`â„šī¸ Artifact version bumped from ${i} to ${e.version}.`), await di(`${t}package.json`, e);
7740
+ e.version = `${s[0]}.${s[1]}.${Number(s[2]) + 1}`, console.info(`â„šī¸ Project version bumped from ${i} to ${e.version}.`), await di(`${t}package.json`, e);
7741
7741
  }
7742
7742
  }
7743
7743
  const Oh = ["critical", "high", "moderate", "low", "unknown"];
7744
7744
  async function Hh() {
7745
7745
  try {
7746
- Ne("Audit Dependencies"), await Nh(), await Ae("owasp-dependency-check", [
7746
+ Ne("Audit Dependencies"), await Nh(), await Ae("", "owasp-dependency-check", [
7747
7747
  "--project",
7748
7748
  "@datapos/datapos-development",
7749
7749
  "--enableRetired",
7750
7750
  "--nodePackageSkipDevDependencies",
7751
7751
  "--nvdApiKey",
7752
7752
  process.env.NVD_API_KEY ?? ""
7753
- ]), We("Insert OWASP Badge(s) into 'README.md'"), await Mh(), await Ae("npm", ["audit"]), Ve("Dependency auditing complete.");
7753
+ ]), We("Insert OWASP Badge(s) into 'README.md'"), await Mh(), await Ae("", "npm", ["audit"]), Ve("Dependency auditing complete.");
7754
7754
  } catch (e) {
7755
7755
  console.error("❌ Error auditing dependencies.", e), process.exit(1);
7756
7756
  }
@@ -7801,7 +7801,7 @@ async function Rh(e) {
7801
7801
  }
7802
7802
  async function Wh() {
7803
7803
  try {
7804
- Ne("Check Dependencies"), await Ae("npm", ["outdated"], !0), await Ae("npm-check-updates", ["-i"]), Ve("Dependency checking complete.");
7804
+ Ne("Check Dependencies"), await Ae("", "npm", ["outdated"], !0), await Ae("", "npm-check-updates", ["-i"]), Ve("Dependency checking complete.");
7805
7805
  } catch (e) {
7806
7806
  console.error("❌ Error checking dependencies.", e), process.exit(1);
7807
7807
  }
@@ -7841,14 +7841,14 @@ async function Dh() {
7841
7841
  }
7842
7842
  async function Gh() {
7843
7843
  try {
7844
- Ne("Format Code"), await Ae("prettier", ["--write", "src/"]), Ve("Code formatting complete.");
7844
+ Ne("Format Code"), await Ae("", "prettier", ["--write", "src/"]), Ve("Code formatting complete.");
7845
7845
  } catch (e) {
7846
7846
  console.error("❌ Error formatting code.", e), process.exit(1);
7847
7847
  }
7848
7848
  }
7849
7849
  async function Jh() {
7850
7850
  try {
7851
- Ne("Lint Code"), await Ae("eslint", ["."]), Ve("Code linting complete.");
7851
+ Ne("Lint Code"), await Ae("", "eslint", ["."]), Ve("Code linting complete.");
7852
7852
  } catch (e) {
7853
7853
  console.error("❌ Error linting code.", e), process.exit(1);
7854
7854
  }
@@ -7857,7 +7857,7 @@ async function Xh(e) {
7857
7857
  try {
7858
7858
  Ne("Update datapos Dependencies");
7859
7859
  for (const t of e)
7860
- await Ae("npm", ["install", `@datapos/datapos-${t}@latest`]);
7860
+ await Ae("", "npm", ["install", `@datapos/datapos-${t}@latest`]);
7861
7861
  Ve("Updating datapos dependencies complete.");
7862
7862
  } catch (t) {
7863
7863
  console.error("❌ Error updating datapos dependencies.", t), process.exit(1);
@@ -8039,20 +8039,20 @@ async function np(e) {
8039
8039
  }
8040
8040
  export {
8041
8041
  Hh as auditDependencies,
8042
- $h as buildArtifact,
8043
8042
  Qh as buildConfig,
8044
8043
  Yh as buildConnectorConfig,
8045
8044
  ep as buildContextConfig,
8046
8045
  tp as buildPresenterConfig,
8046
+ $h as buildProject,
8047
8047
  ip as buildPublicDirectoryIndex,
8048
8048
  Wh as checkDependencies,
8049
8049
  Kh as documentDependencies,
8050
8050
  Gh as formatCode,
8051
8051
  Jh as lintCode,
8052
- Uh as releaseArtifact,
8052
+ Uh as releaseProject,
8053
8053
  sp as sendDeploymentNotice,
8054
- Zh as syncArtifactWithGitHub,
8055
- qh as testArtifact,
8054
+ Zh as syncProjectWithGitHub,
8055
+ qh as testProject,
8056
8056
  Xh as updateDataPosDependencies,
8057
8057
  rp as uploadDirectoryToR2,
8058
8058
  ap as uploadModuleConfigToDO,
@@ -11,7 +11,7 @@ declare function uploadDirectoryToR2(sourceDirectory: string, uploadDirectory: s
11
11
  declare function uploadModuleConfigToDO(): Promise<void>;
12
12
  declare function uploadModuleToR2(uploadDirectoryPath: string): Promise<void>;
13
13
  export { buildConfig, buildConnectorConfig, buildContextConfig, buildPresenterConfig, buildPublicDirectoryIndex, sendDeploymentNotice, uploadDirectoryToR2, uploadModuleConfigToDO, uploadModuleToR2 };
14
- export { buildArtifact, releaseArtifact, syncArtifactWithGitHub, testArtifact } from './operations/manageArtifact';
14
+ export { buildProject, releaseProject, syncProjectWithGitHub, testProject } from './operations/manageArtifact';
15
15
  export { auditDependencies } from './operations/auditDependencies';
16
16
  export { checkDependencies } from './operations/checkDependencies';
17
17
  export { documentDependencies } from './operations/documentDependencies';
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Manage artifact operation.
2
+ * Manage project operation.
3
3
  */
4
- declare function buildArtifact(): Promise<void>;
5
- declare function releaseArtifact(sendDeployNotice?: boolean): Promise<void>;
6
- declare function syncArtifactWithGitHub(): Promise<void>;
7
- declare function testArtifact(): void;
8
- export { buildArtifact, releaseArtifact, syncArtifactWithGitHub, testArtifact };
4
+ declare function buildProject(): Promise<void>;
5
+ declare function releaseProject(sendDeployNotice?: boolean): Promise<void>;
6
+ declare function syncProjectWithGitHub(): Promise<void>;
7
+ declare function testProject(): void;
8
+ export { buildProject, releaseProject, syncProjectWithGitHub, testProject };
@@ -8,7 +8,7 @@ declare function logOperationSuccess(message: string): void;
8
8
  declare function logStepHeader(text: string): void;
9
9
  declare function readJSONFile<T>(path: string): Promise<T>;
10
10
  declare function readTextFile(path: string): Promise<string>;
11
- declare function spawnCommand(command: string, arguments_?: string[], ignoreErrors?: boolean): Promise<void>;
11
+ declare function spawnCommand(label: string, command: string, arguments_?: string[], ignoreErrors?: boolean): Promise<void>;
12
12
  declare function writeJSONFile(path: string, data: object): Promise<void>;
13
13
  declare function writeTextFile(path: string, data: string): Promise<void>;
14
14
  export { determineConnectorUsageId, execCommand, extractOperationsFromSource, loadEnvironmentVariables, logOperationHeader, logOperationSuccess, logStepHeader, readJSONFile, readTextFile, spawnCommand, writeJSONFile, writeTextFile };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-development",
3
- "version": "0.3.220",
3
+ "version": "0.3.222",
4
4
  "description": "A library of utilities for managing the Data Positioning repositories.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",
@@ -60,14 +60,14 @@
60
60
  },
61
61
  "scripts": {
62
62
  "audit": "node -e \"import('./dist/datapos-development.es.js').then(m => m.auditDependencies())\"",
63
- "build": "node -e \"import('./dist/datapos-development.es.js').then(m => m.buildArtifact())\"",
63
+ "build": "node -e \"import('./dist/datapos-development.es.js').then(m => m.buildProject())\"",
64
64
  "check": "node -e \"import('./dist/datapos-development.es.js').then(m => m.checkDependencies())\"",
65
65
  "document": "node -e \"import('./dist/datapos-development.es.js').then(m => m.documentDependencies(['BSD-2-Clause','MIT']))\"",
66
66
  "format": "node -e \"import('./dist/datapos-development.es.js').then(m => m.formatCode())\"",
67
67
  "lint": "node -e \"import('./dist/datapos-development.es.js').then(m => m.lintCode())\"",
68
- "release": "node -e \"import('./dist/datapos-development.es.js').then(m => m.releaseArtifact())\"",
69
- "sync": "node -e \"import('./dist/datapos-development.es.js').then(m => m.syncArtifactWithGitHub())\"",
70
- "test": "node -e \"import('./dist/datapos-development.es.js').then(m => m.testArtifact())\"",
68
+ "release": "node -e \"import('./dist/datapos-development.es.js').then(m => m.releaseProject())\"",
69
+ "sync": "node -e \"import('./dist/datapos-development.es.js').then(m => m.syncProjectWithGitHub())\"",
70
+ "test": "node -e \"import('./dist/datapos-development.es.js').then(m => m.testProject())\"",
71
71
  "update:dataPosDeps": "node -e \"import('./dist/datapos-development.es.js').then(m => m.updateDataPosDependencies(['shared']))\""
72
72
  },
73
73
  "engines": {