Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add form-json-schema package #870

Merged
merged 4 commits into from
Nov 2, 2023
Merged

Conversation

pinussilvestrus
Copy link
Contributor

@pinussilvestrus pinussilvestrus commented Oct 31, 2023

Related to pinussilvestrus/form-json-schema#6

Adds the form-json-schema to the form-js monorepo.

Todo:

  • Add $schema to our example files
  • fixup failing windows CI

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Oct 31, 2023
@pinussilvestrus pinussilvestrus marked this pull request as ready for review October 31, 2023 12:02
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Oct 31, 2023
@pinussilvestrus
Copy link
Contributor Author

Our CI has some troubles currently, I will retry later.

@pinussilvestrus
Copy link
Contributor Author

Windows CI currently failing due to nodejs/node#50136

@pinussilvestrus pinussilvestrus force-pushed the move-form-json-schema branch 2 times, most recently from 156cecd to f98a235 Compare November 1, 2023 12:55
@pinussilvestrus
Copy link
Contributor Author

pinussilvestrus commented Nov 1, 2023

We probably need to make the schema generation scripts a bit more robust on Windows

PS C:\Users\Vinicius\repos\form-js> npm ci
npm ERR! code 1
npm ERR! path C:\Users\Vinicius\repos\form-js\packages\form-json-schema
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c run-s build
npm ERR! > @bpmn-io/form-json-schema@1.3.3 build
npm ERR! > run-s build:error-messages build:schema
npm ERR!
npm ERR!
npm ERR! > @bpmn-io/form-json-schema@1.3.3 build:error-messages
npm ERR! > node tasks/generate-error-messages.js --input=./src/error-messages.json --output=./resources/error-messages.json
npm ERR!
npm ERR!
npm ERR! > @bpmn-io/form-json-schema@1.3.3 build:schema
npm ERR! > node tasks/generate-schema.js --input=./src/index.json --output=./resources/schema.json
npm ERR! {
npm ERR! stack: 'JSONParserError: Error opening file "C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json" \n' +
npm ERR! "ENOENT: no such file or directory, open 'C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json'\n" +
npm ERR! ' at Object. (C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\lib\resolvers\file.js:72:23)\n' +
npm ERR! ' at Generator.throw ()\n' +
npm ERR! ' at rejected (C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\lib\resolvers\file.js:29:65)',
npm ERR! code: 'ERESOLVER',
npm ERR! name: 'ResolverError',
npm ERR! message: 'Error opening file "C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json" \n' +
npm ERR! "ENOENT: no such file or directory, open 'C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json'",
npm ERR! source: 'C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json',
npm ERR! path: null,
npm ERR! toJSON: [Function: toJSON],
npm ERR! ioErrorCode: 'ENOENT',
npm ERR! footprint: 'null+C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json+ERESOLVER+Error opening file "C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json" \n' +
npm ERR! "ENOENT: no such file or directory, open 'C:\Users\Vinicius\repos\form-js\node_modules\@APIDevTools\json-schema-ref-parser\dist\src\defs\rules\rules-default.json'",
npm ERR! toString: [Function: toString]
npm ERR! }
npm ERR! npm ERR! Lifecycle script build:schema failed with error:
npm ERR! npm ERR! Error: command failed
npm ERR! npm ERR! in workspace: @bpmn-io/form-json-schema@1.3.3
npm ERR! npm ERR! at location: C:\Users\Vinicius\repos\form-js\packages\form-json-schema
npm ERR! ERROR: "build:schema" exited with 1.
npm ERR! npm ERR! Lifecycle script build failed with error:
npm ERR! npm ERR! Error: command failed
npm ERR! npm ERR! in workspace: @bpmn-io/form-json-schema@1.3.3
npm ERR! npm ERR! at location: C:\Users\Vinicius\repos\form-js\packages\form-json-schema
npm ERR! ERROR: "build" exited with 1.

@pinussilvestrus
Copy link
Contributor Author

Resolved the broken Windows build by downgrading json-schema-ref-parse (cf. APIDevTools/json-schema-ref-parser#303)

@pinussilvestrus pinussilvestrus merged commit 2e00595 into develop Nov 2, 2023
10 checks passed
@pinussilvestrus pinussilvestrus deleted the move-form-json-schema branch November 2, 2023 10:29
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants