@codama/renderers-js 1.5.2 → 1.5.4
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 +523 -676
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs +323 -568
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.cjs +523 -693
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +323 -568
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.react-native.mjs +323 -568
- package/dist/index.react-native.mjs.map +1 -1
- package/dist/types/utils/formatCode.d.ts +7 -0
- package/dist/types/utils/formatCode.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/options.d.ts +1 -3
- package/dist/types/utils/options.d.ts.map +1 -1
- package/dist/types/visitors/renderVisitor.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RenderMap } from '@codama/renderers-core';
|
|
2
|
+
import { format } from 'prettier';
|
|
3
|
+
import { Fragment } from './fragment';
|
|
4
|
+
import { RenderOptions } from './options';
|
|
5
|
+
export type PrettierOptions = Parameters<typeof format>[1];
|
|
6
|
+
export declare function formatCode(renderMap: RenderMap<Fragment>, options: Pick<RenderOptions, 'formatCode' | 'packageFolder' | 'prettierOptions'>): Promise<RenderMap<Fragment>>;
|
|
7
|
+
//# sourceMappingURL=formatCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatCode.d.ts","sourceRoot":"","sources":["../../../src/utils/formatCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,MAAM,EAAyB,MAAM,UAAU,CAAC;AAIzD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAc3D,wBAAsB,UAAU,CAC5B,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,eAAe,GAAG,iBAAiB,CAAC,GACjF,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAW9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { CamelCaseString } from '@codama/nodes';
|
|
2
2
|
import type { LinkableDictionary } from '@codama/visitors-core';
|
|
3
|
-
import type { format } from 'prettier/standalone';
|
|
4
3
|
import type { TypeManifestVisitor } from '../visitors';
|
|
5
4
|
import type { CustomDataOptions, ParsedCustomDataOptions } from './customData';
|
|
5
|
+
import { PrettierOptions } from './formatCode';
|
|
6
6
|
import type { GetImportFromFunction, LinkOverrides } from './linkOverrides';
|
|
7
7
|
import type { NameApi, NameTransformers } from './nameTransformers';
|
|
8
|
-
type PrettierOptions = Parameters<typeof format>[1];
|
|
9
8
|
export type RenderOptions = GetRenderMapOptions & {
|
|
10
9
|
deleteFolderBeforeRendering?: boolean;
|
|
11
10
|
formatCode?: boolean;
|
|
@@ -40,5 +39,4 @@ export type RenderScope = {
|
|
|
40
39
|
typeManifestVisitor: TypeManifestVisitor;
|
|
41
40
|
useGranularImports: boolean;
|
|
42
41
|
};
|
|
43
|
-
export {};
|
|
44
42
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/utils/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/utils/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IAC9C,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IACzC,kBAAkB,EAAE,OAAO,CAAC;CAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/renderVisitor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/renderVisitor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,aAAa,EAAmB,MAAM,UAAU,CAAC;AAGtE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,sEAmBtE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codama/renderers-js",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "JavaScript renderer compatible with the Solana Kit library",
|
|
5
5
|
"exports": {
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"client"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@codama/errors": "^1.4.
|
|
41
|
-
"@codama/nodes": "^1.4.
|
|
42
|
-
"@codama/renderers-core": "^1.3.
|
|
43
|
-
"@codama/visitors-core": "^1.4.
|
|
40
|
+
"@codama/errors": "^1.4.4",
|
|
41
|
+
"@codama/nodes": "^1.4.4",
|
|
42
|
+
"@codama/renderers-core": "^1.3.3",
|
|
43
|
+
"@codama/visitors-core": "^1.4.4",
|
|
44
44
|
"@solana/codecs-strings": "^5.0.0",
|
|
45
45
|
"prettier": "^3.6.2",
|
|
46
46
|
"semver": "^7.7.3"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@changesets/changelog-github": "^0.5.1",
|
|
50
50
|
"@changesets/cli": "^2.29.7",
|
|
51
|
-
"@codama/nodes-from-anchor": "^1.3.
|
|
51
|
+
"@codama/nodes-from-anchor": "^1.3.6",
|
|
52
52
|
"@solana/eslint-config-solana": "^5.0.0",
|
|
53
53
|
"@solana/prettier-config-solana": "0.0.5",
|
|
54
54
|
"@types/node": "^24",
|