@intlify/bundle-utils 10.0.1 → 12.0.0-alpha.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.
- package/lib/index.cjs +454 -541
- package/lib/index.d.cts +18 -16
- package/lib/index.d.mts +18 -16
- package/lib/index.d.ts +18 -16
- package/lib/index.mjs +451 -539
- package/package.json +9 -12
package/lib/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { JSONProgram } from 'jsonc-eslint-parser/lib/parser/ast';
|
|
2
1
|
import { RawSourceMap } from 'source-map-js';
|
|
3
2
|
import { CompileError } from '@intlify/message-compiler';
|
|
4
|
-
import { YAMLProgram } from 'yaml-eslint-parser/lib/ast';
|
|
5
3
|
import { Node } from 'estree';
|
|
4
|
+
import { JSONProgram } from 'jsonc-eslint-parser/lib/parser/ast';
|
|
5
|
+
import { YAMLProgram } from 'yaml-eslint-parser/lib/ast';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Compilation dev environments
|
|
@@ -47,33 +47,35 @@ interface CodeGenResult<ASTNode, CodeGenError extends Error = Error> {
|
|
|
47
47
|
map?: RawSourceMap;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n';
|
|
51
|
+
declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage;
|
|
52
|
+
type VueI18nVersion = '9' | '10' | 'unknown' | '';
|
|
53
|
+
declare function getVueI18nVersion(debug: Function, pkg?: string): VueI18nVersion;
|
|
54
|
+
|
|
50
55
|
/**
|
|
51
|
-
* Code
|
|
56
|
+
* Code generator for i18n js resource
|
|
52
57
|
*/
|
|
53
58
|
|
|
54
|
-
declare
|
|
55
|
-
|
|
59
|
+
declare class DynamicResourceError extends Error {
|
|
60
|
+
}
|
|
56
61
|
/**
|
|
57
|
-
*
|
|
62
|
+
* @internal
|
|
58
63
|
*/
|
|
64
|
+
declare function generate$2(targetSource: string | Buffer, { type, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, onWarn, strictMessage, escapeHtml, allowDynamic, jit }: CodeGenOptions): CodeGenResult<Node>;
|
|
59
65
|
|
|
60
66
|
/**
|
|
61
|
-
*
|
|
67
|
+
* Code / AST generator for i18n json/json5 resource
|
|
62
68
|
*/
|
|
63
|
-
|
|
69
|
+
|
|
70
|
+
declare function generate$1(targetSource: string | Buffer, { type, onlyLocales, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml, jit }: CodeGenOptions): CodeGenResult<JSONProgram>;
|
|
64
71
|
|
|
65
72
|
/**
|
|
66
|
-
* Code generator for i18n
|
|
73
|
+
* Code generator for i18n yaml resource
|
|
67
74
|
*/
|
|
68
75
|
|
|
69
76
|
/**
|
|
70
77
|
* @internal
|
|
71
78
|
*/
|
|
72
|
-
declare function generate(targetSource: string | Buffer, { type, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml,
|
|
73
|
-
|
|
74
|
-
type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n';
|
|
75
|
-
declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage;
|
|
76
|
-
type VueI18nVersion = '9' | '10' | 'unknown' | '';
|
|
77
|
-
declare function getVueI18nVersion(debug: Function, pkg?: string): VueI18nVersion;
|
|
79
|
+
declare function generate(targetSource: string | Buffer, { type, onlyLocales, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml, jit }: CodeGenOptions): CodeGenResult<YAMLProgram>;
|
|
78
80
|
|
|
79
|
-
export { type CodeGenOptions, type CodeGenResult, type DevEnv, type InstalledPackage, checkInstallPackage, generate$
|
|
81
|
+
export { type CodeGenOptions, type CodeGenResult, type DevEnv, DynamicResourceError, type InstalledPackage, checkInstallPackage, generate$1 as generateJSON, generate$2 as generateJavaScript, generate as generateYAML, getVueI18nVersion };
|
package/lib/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { JSONProgram } from 'jsonc-eslint-parser/lib/parser/ast';
|
|
2
1
|
import { RawSourceMap } from 'source-map-js';
|
|
3
2
|
import { CompileError } from '@intlify/message-compiler';
|
|
4
|
-
import { YAMLProgram } from 'yaml-eslint-parser/lib/ast';
|
|
5
3
|
import { Node } from 'estree';
|
|
4
|
+
import { JSONProgram } from 'jsonc-eslint-parser/lib/parser/ast';
|
|
5
|
+
import { YAMLProgram } from 'yaml-eslint-parser/lib/ast';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Compilation dev environments
|
|
@@ -47,33 +47,35 @@ interface CodeGenResult<ASTNode, CodeGenError extends Error = Error> {
|
|
|
47
47
|
map?: RawSourceMap;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n';
|
|
51
|
+
declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage;
|
|
52
|
+
type VueI18nVersion = '9' | '10' | 'unknown' | '';
|
|
53
|
+
declare function getVueI18nVersion(debug: Function, pkg?: string): VueI18nVersion;
|
|
54
|
+
|
|
50
55
|
/**
|
|
51
|
-
* Code
|
|
56
|
+
* Code generator for i18n js resource
|
|
52
57
|
*/
|
|
53
58
|
|
|
54
|
-
declare
|
|
55
|
-
|
|
59
|
+
declare class DynamicResourceError extends Error {
|
|
60
|
+
}
|
|
56
61
|
/**
|
|
57
|
-
*
|
|
62
|
+
* @internal
|
|
58
63
|
*/
|
|
64
|
+
declare function generate$2(targetSource: string | Buffer, { type, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, onWarn, strictMessage, escapeHtml, allowDynamic, jit }: CodeGenOptions): CodeGenResult<Node>;
|
|
59
65
|
|
|
60
66
|
/**
|
|
61
|
-
*
|
|
67
|
+
* Code / AST generator for i18n json/json5 resource
|
|
62
68
|
*/
|
|
63
|
-
|
|
69
|
+
|
|
70
|
+
declare function generate$1(targetSource: string | Buffer, { type, onlyLocales, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml, jit }: CodeGenOptions): CodeGenResult<JSONProgram>;
|
|
64
71
|
|
|
65
72
|
/**
|
|
66
|
-
* Code generator for i18n
|
|
73
|
+
* Code generator for i18n yaml resource
|
|
67
74
|
*/
|
|
68
75
|
|
|
69
76
|
/**
|
|
70
77
|
* @internal
|
|
71
78
|
*/
|
|
72
|
-
declare function generate(targetSource: string | Buffer, { type, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml,
|
|
73
|
-
|
|
74
|
-
type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n';
|
|
75
|
-
declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage;
|
|
76
|
-
type VueI18nVersion = '9' | '10' | 'unknown' | '';
|
|
77
|
-
declare function getVueI18nVersion(debug: Function, pkg?: string): VueI18nVersion;
|
|
79
|
+
declare function generate(targetSource: string | Buffer, { type, onlyLocales, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml, jit }: CodeGenOptions): CodeGenResult<YAMLProgram>;
|
|
78
80
|
|
|
79
|
-
export { type CodeGenOptions, type CodeGenResult, type DevEnv, type InstalledPackage, checkInstallPackage, generate$
|
|
81
|
+
export { type CodeGenOptions, type CodeGenResult, type DevEnv, DynamicResourceError, type InstalledPackage, checkInstallPackage, generate$1 as generateJSON, generate$2 as generateJavaScript, generate as generateYAML, getVueI18nVersion };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { JSONProgram } from 'jsonc-eslint-parser/lib/parser/ast';
|
|
2
1
|
import { RawSourceMap } from 'source-map-js';
|
|
3
2
|
import { CompileError } from '@intlify/message-compiler';
|
|
4
|
-
import { YAMLProgram } from 'yaml-eslint-parser/lib/ast';
|
|
5
3
|
import { Node } from 'estree';
|
|
4
|
+
import { JSONProgram } from 'jsonc-eslint-parser/lib/parser/ast';
|
|
5
|
+
import { YAMLProgram } from 'yaml-eslint-parser/lib/ast';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Compilation dev environments
|
|
@@ -47,33 +47,35 @@ interface CodeGenResult<ASTNode, CodeGenError extends Error = Error> {
|
|
|
47
47
|
map?: RawSourceMap;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n';
|
|
51
|
+
declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage;
|
|
52
|
+
type VueI18nVersion = '9' | '10' | 'unknown' | '';
|
|
53
|
+
declare function getVueI18nVersion(debug: Function, pkg?: string): VueI18nVersion;
|
|
54
|
+
|
|
50
55
|
/**
|
|
51
|
-
* Code
|
|
56
|
+
* Code generator for i18n js resource
|
|
52
57
|
*/
|
|
53
58
|
|
|
54
|
-
declare
|
|
55
|
-
|
|
59
|
+
declare class DynamicResourceError extends Error {
|
|
60
|
+
}
|
|
56
61
|
/**
|
|
57
|
-
*
|
|
62
|
+
* @internal
|
|
58
63
|
*/
|
|
64
|
+
declare function generate$2(targetSource: string | Buffer, { type, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, onWarn, strictMessage, escapeHtml, allowDynamic, jit }: CodeGenOptions): CodeGenResult<Node>;
|
|
59
65
|
|
|
60
66
|
/**
|
|
61
|
-
*
|
|
67
|
+
* Code / AST generator for i18n json/json5 resource
|
|
62
68
|
*/
|
|
63
|
-
|
|
69
|
+
|
|
70
|
+
declare function generate$1(targetSource: string | Buffer, { type, onlyLocales, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml, jit }: CodeGenOptions): CodeGenResult<JSONProgram>;
|
|
64
71
|
|
|
65
72
|
/**
|
|
66
|
-
* Code generator for i18n
|
|
73
|
+
* Code generator for i18n yaml resource
|
|
67
74
|
*/
|
|
68
75
|
|
|
69
76
|
/**
|
|
70
77
|
* @internal
|
|
71
78
|
*/
|
|
72
|
-
declare function generate(targetSource: string | Buffer, { type, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml,
|
|
73
|
-
|
|
74
|
-
type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n';
|
|
75
|
-
declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage;
|
|
76
|
-
type VueI18nVersion = '9' | '10' | 'unknown' | '';
|
|
77
|
-
declare function getVueI18nVersion(debug: Function, pkg?: string): VueI18nVersion;
|
|
79
|
+
declare function generate(targetSource: string | Buffer, { type, onlyLocales, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, strictMessage, escapeHtml, jit }: CodeGenOptions): CodeGenResult<YAMLProgram>;
|
|
78
80
|
|
|
79
|
-
export { type CodeGenOptions, type CodeGenResult, type DevEnv, type InstalledPackage, checkInstallPackage, generate$
|
|
81
|
+
export { type CodeGenOptions, type CodeGenResult, type DevEnv, DynamicResourceError, type InstalledPackage, checkInstallPackage, generate$1 as generateJSON, generate$2 as generateJavaScript, generate as generateYAML, getVueI18nVersion };
|