@platformos/platformos-check-node 0.0.9 → 0.0.10

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,6 +1,6 @@
1
1
  import { App } from '@platformos/platformos-check-common';
2
2
  import { PartialUsage } from './types';
3
3
  /**
4
- * Collect all partial usages from a theme by visiting function, render, and include tags.
4
+ * Collect all partial usages from an app by visiting function, render, and include tags.
5
5
  */
6
- export declare function collectPartialUsages(theme: App, verbose?: boolean, log?: (message: string) => void): Promise<Map<string, PartialUsage>>;
6
+ export declare function collectPartialUsages(app: App, verbose?: boolean, log?: (message: string) => void): Promise<Map<string, PartialUsage>>;
@@ -10,8 +10,8 @@ const liquid_html_parser_2 = require("@platformos/liquid-html-parser");
10
10
  */
11
11
  function getPartialName(node) {
12
12
  if (node.type === liquid_html_parser_1.NodeTypes.RenderMarkup) {
13
- if (node.snippet.type === liquid_html_parser_1.NodeTypes.String) {
14
- return node.snippet.value;
13
+ if (node.partial.type === liquid_html_parser_1.NodeTypes.String) {
14
+ return node.partial.value;
15
15
  }
16
16
  return undefined;
17
17
  }
@@ -63,11 +63,11 @@ function parseUsageKey(key) {
63
63
  };
64
64
  }
65
65
  /**
66
- * Collect all partial usages from a theme by visiting function, render, and include tags.
66
+ * Collect all partial usages from an app by visiting function, render, and include tags.
67
67
  */
68
- async function collectPartialUsages(theme, verbose = false, log = console.log) {
68
+ async function collectPartialUsages(app, verbose = false, log = console.log) {
69
69
  const usageMap = new Map();
70
- for (const sourceCode of theme) {
70
+ for (const sourceCode of app) {
71
71
  if (sourceCode.type !== platformos_check_common_1.SourceCodeType.LiquidHtml)
72
72
  continue;
73
73
  if (!(0, liquid_html_parser_2.isLiquidHtmlNode)(sourceCode.ast))
package/dist/index.d.ts CHANGED
@@ -23,5 +23,3 @@ export declare function getApp(config: Config): Promise<App>;
23
23
  export declare function getAppFilesPathPattern(rootUri: string): string;
24
24
  /** @deprecated Use appCheckRun instead */
25
25
  export declare const runCheck: typeof appCheckRun;
26
- /** @deprecated Use appCheckRun instead */
27
- export declare const themeCheckRun: typeof appCheckRun;
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.themeCheckRun = exports.runCheck = exports.loadConfig = exports.runBackfillDocsCLI = exports.NodeFileSystem = void 0;
20
+ exports.runCheck = exports.loadConfig = exports.runBackfillDocsCLI = exports.NodeFileSystem = void 0;
21
21
  exports.toSourceCode = toSourceCode;
22
22
  exports.check = check;
23
23
  exports.checkAndAutofix = checkAndAutofix;
@@ -126,6 +126,4 @@ function getAppFilesPathPattern(rootUri) {
126
126
  }
127
127
  /** @deprecated Use appCheckRun instead */
128
128
  exports.runCheck = appCheckRun;
129
- /** @deprecated Use appCheckRun instead */
130
- exports.themeCheckRun = appCheckRun;
131
129
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformos/platformos-check-node",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "platformOS",
@@ -33,8 +33,8 @@
33
33
  "type-check": "tsc --noEmit"
34
34
  },
35
35
  "dependencies": {
36
- "@platformos/platformos-check-common": "0.0.9",
37
- "@platformos/platformos-check-docs-updater": "0.0.9",
36
+ "@platformos/platformos-check-common": "0.0.10",
37
+ "@platformos/platformos-check-docs-updater": "0.0.10",
38
38
  "glob": "^13.0.0",
39
39
  "vscode-uri": "^3.1.0",
40
40
  "yaml": "^2.8.2"