typescript model
This commit is contained in:
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,7 +1,8 @@
|
|||||||
/plantuml/
|
./plantuml
|
||||||
/sql/
|
./sql
|
||||||
/src/
|
./src
|
||||||
/pom_jpa.xml
|
./angular
|
||||||
/TelosysTools/downloads
|
./pom_jpa.xml
|
||||||
/TelosysTools/templates
|
./TelosysTools/downloads
|
||||||
!/TelosysTools/templates/infinimotion
|
./TelosysTools/templates
|
||||||
|
!./TelosysTools/templates/infinimotion
|
||||||
6
.idea/jsLibraryMappings.xml
generated
Normal file
6
.idea/jsLibraryMappings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptLibraryMappings">
|
||||||
|
<file url="file://$PROJECT_DIR$" libraries="{Node.js Core}" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
1
.idea/model.iml
generated
1
.idea/model.iml
generated
@@ -16,6 +16,7 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/plantuml" />
|
<excludeFolder url="file://$MODULE_DIR$/plantuml" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/sql" />
|
<excludeFolder url="file://$MODULE_DIR$/sql" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/src" />
|
<excludeFolder url="file://$MODULE_DIR$/src" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/TelosysTools/templates/infinimotion/angular" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|||||||
1
TelosysTools/templates/infinimotion/angular/.npmrc.vm
Normal file
1
TelosysTools/templates/infinimotion/angular/.npmrc.vm
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@InfiniMotion:registry=https://npm.pkg.github.com
|
||||||
6
TelosysTools/templates/infinimotion/angular/Xmodel_ts.vm
Normal file
6
TelosysTools/templates/infinimotion/angular/Xmodel_ts.vm
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#set( $env.language = 'TypeScript' )
|
||||||
|
export default interface $entity.name {
|
||||||
|
#foreach( $attribute in $entity.attributes )
|
||||||
|
${attribute.name}: ${attribute.type};
|
||||||
|
#end
|
||||||
|
}
|
||||||
9
TelosysTools/templates/infinimotion/angular/index_ts.vm
Normal file
9
TelosysTools/templates/infinimotion/angular/index_ts.vm
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#foreach( $entity in $model.allEntities )
|
||||||
|
import $entity.name from "./${entity.name}";
|
||||||
|
#end
|
||||||
|
|
||||||
|
export type {
|
||||||
|
#foreach( $entity in $model.allEntities )
|
||||||
|
$entity.name,
|
||||||
|
#end
|
||||||
|
}
|
||||||
27
TelosysTools/templates/infinimotion/angular/package_json.vm
Normal file
27
TelosysTools/templates/infinimotion/angular/package_json.vm
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "@InfiniMotion/model-frontend",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "InfiniMotion Model for Frontend",
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"module": "./dist/index.mjs",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "Lennart Heinrich",
|
||||||
|
"license": "ISC",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^24.8.0",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
|
"tsup": "^8.5.0",
|
||||||
|
"typescript": "^5.9.3"
|
||||||
|
},
|
||||||
|
"repository": "https://github.com/InfiniMotion/model.git",
|
||||||
|
"publishConfig": {
|
||||||
|
"registry": "https://npm.pkg.github.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
44
TelosysTools/templates/infinimotion/angular/tsconfig_json.vm
Normal file
44
TelosysTools/templates/infinimotion/angular/tsconfig_json.vm
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
// Visit https://aka.ms/tsconfig to read more about this file
|
||||||
|
"compilerOptions": {
|
||||||
|
// File Layout
|
||||||
|
// "rootDir": "./src",
|
||||||
|
"outDir": "./dist",
|
||||||
|
|
||||||
|
// Environment Settings
|
||||||
|
// See also https://aka.ms/tsconfig/module
|
||||||
|
"module": "nodenext",
|
||||||
|
"target": "esnext",
|
||||||
|
"types": ["node"],
|
||||||
|
// For nodejs:
|
||||||
|
// "lib": ["esnext"],
|
||||||
|
// "types": ["node"],
|
||||||
|
// and npm install -D @types/node
|
||||||
|
|
||||||
|
// Other Outputs
|
||||||
|
"sourceMap": true,
|
||||||
|
"declaration": true,
|
||||||
|
"declarationMap": true,
|
||||||
|
|
||||||
|
// Stricter Typechecking Options
|
||||||
|
"noUncheckedIndexedAccess": true,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
|
|
||||||
|
// Style Options
|
||||||
|
// "noImplicitReturns": true,
|
||||||
|
// "noImplicitOverride": true,
|
||||||
|
// "noUnusedLocals": true,
|
||||||
|
// "noUnusedParameters": true,
|
||||||
|
// "noFallthroughCasesInSwitch": true,
|
||||||
|
// "noPropertyAccessFromIndexSignature": true,
|
||||||
|
|
||||||
|
// Recommended Options
|
||||||
|
"strict": true,
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"verbatimModuleSyntax": false,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noUncheckedSideEffectImports": true,
|
||||||
|
"moduleDetection": "force",
|
||||||
|
"skipLibCheck": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { defineConfig } from "tsup";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["index.ts"],
|
||||||
|
format: ["cjs", "esm"], // Build for commonJS and ESmodules
|
||||||
|
dts: true, // Generate declaration file (.d.ts)
|
||||||
|
splitting: false,
|
||||||
|
sourcemap: true,
|
||||||
|
clean: true,
|
||||||
|
});
|
||||||
@@ -32,3 +32,11 @@ Tests : database init ; DatabaseInit.java ; ${TEST_SRC}/${ROOT_PKG}/enti
|
|||||||
Tests : entity tests ; ${BEANNAME}JpaTest.java ; ${TEST_SRC}/${ROOT_PKG}/entities ; test-java/XxxJpaTest_java.vm ; *
|
Tests : entity tests ; ${BEANNAME}JpaTest.java ; ${TEST_SRC}/${ROOT_PKG}/entities ; test-java/XxxJpaTest_java.vm ; *
|
||||||
#--- src/test/resources
|
#--- src/test/resources
|
||||||
Tests : persistence.xml ; persistence.xml ; ${TEST_RES}/META-INF ; test-resources/persistence_xml.vm ; 1
|
Tests : persistence.xml ; persistence.xml ; ${TEST_RES}/META-INF ; test-resources/persistence_xml.vm ; 1
|
||||||
|
|
||||||
|
# Angular
|
||||||
|
.npmrc ; .npmrc ; angular ; angular/.npmrc.vm ; 1
|
||||||
|
package.json ; package.json ; angular ; angular/package_json.vm ; 1
|
||||||
|
tsconfig.json ; tsconfig.json ; angular ; angular/tsconfig_json.vm ; 1
|
||||||
|
tsup.config.ts ; tsup.config.ts ; angular ; angular/tsup.config_ts.vm ; 1
|
||||||
|
index.ts ; index.ts ; angular ; angular/index_ts.vm ; 1
|
||||||
|
TypeScript Models ; ${BEANNAME}.ts ; angular ; angular/Xmodel_ts.vm
|
||||||
Reference in New Issue
Block a user