@dbx-tools/core 0.3.36 → 0.3.39

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 CHANGED
@@ -12,20 +12,24 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "yaml": "^2.9.0",
15
- "@dbx-tools/shared-core": "0.3.36"
15
+ "@dbx-tools/shared-core": "0.3.39"
16
16
  },
17
17
  "main": "index.ts",
18
18
  "license": "UNLICENSED",
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },
22
- "version": "0.3.36",
22
+ "version": "0.3.39",
23
23
  "types": "index.ts",
24
24
  "type": "module",
25
25
  "exports": {
26
26
  ".": "./index.ts",
27
27
  "./package.json": "./package.json"
28
28
  },
29
+ "files": [
30
+ "index.ts",
31
+ "src"
32
+ ],
29
33
  "dbxToolsConfig": {
30
34
  "tags": [
31
35
  "node"
@@ -1,39 +0,0 @@
1
- import assert from "node:assert/strict";
2
- import { mkdtemp, realpath, rm, writeFile, mkdir } from "node:fs/promises";
3
- import { tmpdir } from "node:os";
4
- import { join } from "node:path";
5
- import { describe, it } from "node:test";
6
- import { brand } from "../index";
7
-
8
- describe("brand files", () => {
9
- it("loads YAML and discovers the conventional branding path", async () => {
10
- const root = await mkdtemp(join(tmpdir(), "dbx-tools-brand-"));
11
- try {
12
- await writeFile(join(root, "package.json"), '{"name":"fixture"}\n');
13
- await mkdir(join(root, "branding"));
14
- await writeFile(join(root, "branding", "brand.yaml"), "name: Fixture\ncolors:\n primary: '#123456'\n");
15
-
16
- assert.equal(
17
- brand.findBrandContextFile(root),
18
- join(await realpath(root), "branding", "brand.yaml"),
19
- );
20
- const context = await brand.loadBrandContext(root);
21
- assert.equal(context.name, "Fixture");
22
- assert.equal(context.colors.primary, "#123456");
23
- } finally {
24
- await rm(root, { recursive: true, force: true });
25
- }
26
- });
27
-
28
- it("loads JSON and resolves relative assets", async () => {
29
- const root = await mkdtemp(join(tmpdir(), "dbx-tools-brand-"));
30
- try {
31
- const file = join(root, "brand.json");
32
- await writeFile(file, '{"name":"JSON Fixture"}\n');
33
- assert.equal((await brand.loadBrandContextFile(file)).name, "JSON Fixture");
34
- assert.equal(brand.resolveBrandAssetPath(file, "assets/icon.svg"), join(root, "assets", "icon.svg"));
35
- } finally {
36
- await rm(root, { recursive: true, force: true });
37
- }
38
- });
39
- });
@@ -1,14 +0,0 @@
1
- // ~~ Generated by projen. To modify, edit .projenrc.js and run "pnpm exec projen".
2
- {
3
- "extends": "../tsconfig.json",
4
- "compilerOptions": {
5
- "noEmit": true,
6
- "rootDir": ".."
7
- },
8
- "include": [
9
- "**/*.ts"
10
- ],
11
- "exclude": [
12
- "node_modules"
13
- ]
14
- }
package/tsconfig.json DELETED
@@ -1,41 +0,0 @@
1
- // ~~ Generated by projen. To modify, edit .projenrc.js and run "pnpm exec projen".
2
- {
3
- "compilerOptions": {
4
- "rootDir": "src",
5
- "outDir": "lib",
6
- "alwaysStrict": true,
7
- "declaration": true,
8
- "esModuleInterop": true,
9
- "experimentalDecorators": true,
10
- "inlineSourceMap": true,
11
- "inlineSources": true,
12
- "lib": [
13
- "ES2022"
14
- ],
15
- "module": "ESNext",
16
- "noEmitOnError": false,
17
- "noFallthroughCasesInSwitch": true,
18
- "noImplicitAny": true,
19
- "noImplicitReturns": true,
20
- "noImplicitThis": true,
21
- "noUnusedLocals": true,
22
- "noUnusedParameters": true,
23
- "resolveJsonModule": true,
24
- "strict": true,
25
- "strictNullChecks": true,
26
- "strictPropertyInitialization": true,
27
- "stripInternal": true,
28
- "target": "ES2022",
29
- "types": [
30
- "node"
31
- ],
32
- "moduleResolution": "bundler",
33
- "skipLibCheck": true
34
- },
35
- "include": [
36
- "src/**/*.ts"
37
- ],
38
- "exclude": [
39
- "node_modules"
40
- ]
41
- }