@codama/renderers-js 1.5.3 → 1.5.5
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/index.browser.cjs +19 -18
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs +19 -19
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.cjs +20 -18
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +21 -20
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.react-native.mjs +19 -19
- package/dist/index.react-native.mjs.map +1 -1
- package/dist/types/utils/formatCode.d.ts +4 -4
- package/dist/types/utils/formatCode.d.ts.map +1 -1
- package/dist/types/utils/packageJson.d.ts +3 -2
- package/dist/types/utils/packageJson.d.ts.map +1 -1
- package/dist/types/visitors/renderVisitor.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { format } from 'prettier';
|
|
3
|
-
import { Fragment } from './fragment';
|
|
1
|
+
import { Path } from '@codama/renderers-core';
|
|
2
|
+
import { format } from 'prettier/standalone';
|
|
4
3
|
import { RenderOptions } from './options';
|
|
5
4
|
export type PrettierOptions = Parameters<typeof format>[1];
|
|
6
|
-
export
|
|
5
|
+
export type CodeFormatter = (code: string, path: Path) => Promise<string>;
|
|
6
|
+
export declare function getCodeFormatter(options: Pick<RenderOptions, 'formatCode' | 'packageFolder' | 'prettierOptions'>): Promise<CodeFormatter>;
|
|
7
7
|
//# sourceMappingURL=formatCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatCode.d.ts","sourceRoot":"","sources":["../../../src/utils/formatCode.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"formatCode.d.ts","sourceRoot":"","sources":["../../../src/utils/formatCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAKxD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAM3D,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE1E,wBAAsB,gBAAgB,CAClC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,eAAe,GAAG,iBAAiB,CAAC,GACjF,OAAO,CAAC,aAAa,CAAC,CAWxB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RenderMap } from '@codama/renderers-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { CodeFormatter } from './formatCode';
|
|
3
3
|
import { Fragment } from './fragment';
|
|
4
|
+
import { RenderOptions } from './options';
|
|
4
5
|
type DependencyVersions = Record<string, string>;
|
|
5
6
|
type PackageJson = {
|
|
6
7
|
author?: string;
|
|
@@ -15,7 +16,7 @@ type PackageJson = {
|
|
|
15
16
|
version?: string;
|
|
16
17
|
};
|
|
17
18
|
export declare const DEFAULT_DEPENDENCY_VERSIONS: DependencyVersions;
|
|
18
|
-
export declare function syncPackageJson(renderMap: RenderMap<Fragment>, options: Pick<RenderOptions, 'dependencyMap' | 'dependencyVersions' | 'packageFolder' | 'syncPackageJson' | 'useGranularImports'>): void
|
|
19
|
+
export declare function syncPackageJson(renderMap: RenderMap<Fragment>, formatCode: CodeFormatter, options: Pick<RenderOptions, 'dependencyMap' | 'dependencyVersions' | 'packageFolder' | 'syncPackageJson' | 'useGranularImports'>): Promise<void>;
|
|
19
20
|
export declare function createNewPackageJson(dependencyVersions: DependencyVersions): PackageJson;
|
|
20
21
|
export declare function updateExistingPackageJson(packageJson: PackageJson, dependencyVersions: DependencyVersions): PackageJson;
|
|
21
22
|
export declare function checkExistingPackageJson(packageJson: PackageJson, dependencyVersions: DependencyVersions): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageJson.d.ts","sourceRoot":"","sources":["../../../src/utils/packageJson.ts"],"names":[],"mappings":"AACA,OAAO,EAAkC,SAAS,EAAa,MAAM,wBAAwB,CAAC;AAG9F,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"packageJson.d.ts","sourceRoot":"","sources":["../../../src/utils/packageJson.ts"],"names":[],"mappings":"AACA,OAAO,EAAkC,SAAS,EAAa,MAAM,wBAAwB,CAAC;AAG9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjD,KAAK,WAAW,GAAG;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,kBAUzC,CAAC;AAEF,wBAAsB,eAAe,CACjC,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,IAAI,CACT,aAAa,EACb,eAAe,GAAG,oBAAoB,GAAG,eAAe,GAAG,iBAAiB,GAAG,oBAAoB,CACtG,GACF,OAAO,CAAC,IAAI,CAAC,CAsCf;AAED,wBAAgB,oBAAoB,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,WAAW,CAgBxF;AAED,wBAAgB,yBAAyB,CACrC,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,kBAAkB,GACvC,WAAW,CA+Bb;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CA0B/G;AAED,wBAAgB,yBAAyB,CACrC,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1C,kBAAkB,EAAE,OAAO,GAC5B,kBAAkB,CA8BpB;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,WA8BhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/renderVisitor.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"renderVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/renderVisitor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,aAAa,EAAmB,MAAM,UAAU,CAAC;AAG5E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,sEAoBtE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codama/renderers-js",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"description": "JavaScript renderer compatible with the Solana Kit library",
|
|
5
5
|
"exports": {
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@codama/errors": "^1.4.4",
|
|
41
41
|
"@codama/nodes": "^1.4.4",
|
|
42
|
-
"@codama/renderers-core": "^1.3.
|
|
42
|
+
"@codama/renderers-core": "^1.3.4",
|
|
43
43
|
"@codama/visitors-core": "^1.4.4",
|
|
44
44
|
"@solana/codecs-strings": "^5.0.0",
|
|
45
45
|
"prettier": "^3.6.2",
|