@dxos/protobuf-compiler 0.8.2-main.30e4dbb → 0.8.2-main.4c6cf53
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/dist/src/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,GAAE,aAAkB;IAGzD,qBAAqB,CACnB,cAAc,EAAE,MAAM,EAAE,EACxB,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,GAAE,aAAkB;IAGzD,qBAAqB,CACnB,cAAc,EAAE,MAAM,EAAE,EACxB,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM,GACjB,IAAI;IAYP,sBAAsB,CACpB,mBAAmB,EAAE,eAAe,EACpC,aAAa,EAAE,gBAAgB,GAC9B,IAAI;CAYR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-specifier.d.ts","sourceRoot":"","sources":["../../src/module-specifier.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,qBAAa,eAAe;aAWR,IAAI,EAAE,MAAM;aACZ,WAAW,EAAE,MAAM;IAXrC,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"module-specifier.d.ts","sourceRoot":"","sources":["../../src/module-specifier.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,qBAAa,eAAe;aAWR,IAAI,EAAE,MAAM;aACZ,WAAW,EAAE,MAAM;IAXrC,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe;gBAUxD,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM;IAKrC,UAAU,IAAI,OAAO;IAIrB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IAc9C,OAAO,IAAI,MAAM;CAGlB;AAED,eAAO,MAAM,YAAY,iBAAmE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/protobuf-compiler",
|
|
3
|
-
"version": "0.8.2-main.
|
|
3
|
+
"version": "0.8.2-main.4c6cf53",
|
|
4
4
|
"homepage": "https://dxos.org",
|
|
5
5
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"protobufjs": "^7.2.5",
|
|
24
24
|
"read-pkg": "^5.2.0",
|
|
25
25
|
"ts-morph": "^16.0.0",
|
|
26
|
-
"@dxos/invariant": "0.8.2-main.
|
|
27
|
-
"@dxos/log": "0.8.2-main.
|
|
28
|
-
"@dxos/node-std": "0.8.2-main.
|
|
26
|
+
"@dxos/invariant": "0.8.2-main.4c6cf53",
|
|
27
|
+
"@dxos/log": "0.8.2-main.4c6cf53",
|
|
28
|
+
"@dxos/node-std": "0.8.2-main.4c6cf53"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@swc-node/register": "1.9.1",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"mocha": "^10.6.0",
|
|
37
37
|
"ts-node": "10.9.1",
|
|
38
38
|
"typescript": "^5.8.3",
|
|
39
|
-
"@dxos/codec-protobuf": "0.8.2-main.
|
|
40
|
-
"@dxos/protobuf-test": "0.8.2-main.
|
|
39
|
+
"@dxos/codec-protobuf": "0.8.2-main.4c6cf53",
|
|
40
|
+
"@dxos/protobuf-test": "0.8.2-main.4c6cf53"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"typescript": "^5.7.2"
|
package/src/logger.ts
CHANGED
|
@@ -21,7 +21,7 @@ export class Logger {
|
|
|
21
21
|
protoFilePaths: string[],
|
|
22
22
|
baseDirPath: string | undefined,
|
|
23
23
|
outDirPath: string
|
|
24
|
-
) {
|
|
24
|
+
): void {
|
|
25
25
|
if (this._options?.verbose) {
|
|
26
26
|
console.log(chalk`Output: {bold ${outDirPath}}`);
|
|
27
27
|
console.log(chalk`Sources:`);
|
|
@@ -36,7 +36,7 @@ export class Logger {
|
|
|
36
36
|
logParsedSubstitutions(
|
|
37
37
|
substitutionsModule: ModuleSpecifier,
|
|
38
38
|
substitutions: SubstitutionsMap
|
|
39
|
-
) {
|
|
39
|
+
): void {
|
|
40
40
|
console.log('Processing substitutions...');
|
|
41
41
|
if (this._options?.verbose) {
|
|
42
42
|
console.log(chalk`Definitions: {bold ${substitutionsModule.resolve()}}`);
|
package/src/module-specifier.ts
CHANGED
|
@@ -13,7 +13,7 @@ const require = createRequire(import.meta.url);
|
|
|
13
13
|
* Represents a reference to a module, either as an relative path with the cwd or as a global module specifier.
|
|
14
14
|
*/
|
|
15
15
|
export class ModuleSpecifier {
|
|
16
|
-
static resolveFromFilePath(path: string, context: string) {
|
|
16
|
+
static resolveFromFilePath(path: string, context: string): ModuleSpecifier {
|
|
17
17
|
// Normalize path.
|
|
18
18
|
const relativePath = relative(context, resolve(context, path));
|
|
19
19
|
const pathWithDot = relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
|
|
@@ -29,11 +29,11 @@ export class ModuleSpecifier {
|
|
|
29
29
|
invariant(isAbsolute(contextPath));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
isAbsolute() {
|
|
32
|
+
isAbsolute(): boolean {
|
|
33
33
|
return !this.name.startsWith('.');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
importSpecifier(importContext: string) {
|
|
36
|
+
importSpecifier(importContext: string): string {
|
|
37
37
|
if (this.isAbsolute()) {
|
|
38
38
|
return this.name;
|
|
39
39
|
} else {
|
|
@@ -47,7 +47,7 @@ export class ModuleSpecifier {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
resolve() {
|
|
50
|
+
resolve(): string {
|
|
51
51
|
return require.resolve(this.name, { paths: [this.contextPath] });
|
|
52
52
|
}
|
|
53
53
|
}
|