Skip to content

Commit 5a0b2ab

Browse files
authored
Initial commit
0 parents  commit 5a0b2ab

13 files changed

Lines changed: 3701 additions & 0 deletions

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'build and deploy Speckle functions'
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
publish-automate-function-version: # make sure the action works on a clean machine without building
10+
env:
11+
FUNCTION_SCHEMA_FILE_NAME: functionSchema.json
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4.1.1
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '18.x'
19+
- name: Restore dependencies
20+
run: npm ci
21+
- name: Extract functionInputSchema
22+
id: extract_schema
23+
run: |
24+
npm run generateSchema ${HOME}/${{ env.FUNCTION_SCHEMA_FILE_NAME }}
25+
- name: Speckle Automate Function - Build and Publish
26+
uses: specklesystems/speckle-automate-github-composite-action@0.7.2
27+
with:
28+
speckle_automate_url: 'https://automate.speckle.dev'
29+
speckle_token: ${{ secrets.SPECKLE_FUNCTION_TOKEN }}
30+
speckle_function_id: ${{ secrets.SPECKLE_FUNCTION_ID }}
31+
speckle_function_input_schema_file_path: ${{ env.FUNCTION_SCHEMA_FILE_NAME }}
32+
speckle_function_command: 'node index.js'

.gitignore

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,node
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,node
3+
4+
.tool-versions
5+
.env
6+
.envrc
7+
8+
9+
### Node ###
10+
# Logs
11+
logs
12+
*.log
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
lerna-debug.log*
17+
.pnpm-debug.log*
18+
19+
# Diagnostic reports (https://nodejs.org/api/report.html)
20+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
21+
22+
# Runtime data
23+
pids
24+
*.pid
25+
*.seed
26+
*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
lib-cov
30+
31+
# Coverage directory used by tools like istanbul
32+
coverage
33+
*.lcov
34+
35+
# nyc test coverage
36+
.nyc_output
37+
38+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
39+
.grunt
40+
41+
# Bower dependency directory (https://bower.io/)
42+
bower_components
43+
44+
# node-waf configuration
45+
.lock-wscript
46+
47+
# Compiled binary addons (https://nodejs.org/api/addons.html)
48+
build/Release
49+
50+
# Dependency directories
51+
node_modules/
52+
jspm_packages/
53+
54+
# Snowpack dependency directory (https://snowpack.dev/)
55+
web_modules/
56+
57+
# TypeScript cache
58+
*.tsbuildinfo
59+
60+
# Optional npm cache directory
61+
.npm
62+
63+
# Optional eslint cache
64+
.eslintcache
65+
66+
# Optional stylelint cache
67+
.stylelintcache
68+
69+
# Microbundle cache
70+
.rpt2_cache/
71+
.rts2_cache_cjs/
72+
.rts2_cache_es/
73+
.rts2_cache_umd/
74+
75+
# Optional REPL history
76+
.node_repl_history
77+
78+
# Output of 'npm pack'
79+
*.tgz
80+
81+
# Yarn Integrity file
82+
.yarn-integrity
83+
84+
# dotenv environment variable files
85+
.env
86+
.env.development.local
87+
.env.test.local
88+
.env.production.local
89+
.env.local
90+
91+
# parcel-bundler cache (https://parceljs.org/)
92+
.cache
93+
.parcel-cache
94+
95+
# Next.js build output
96+
.next
97+
out
98+
99+
# Nuxt.js build / generate output
100+
.nuxt
101+
dist
102+
103+
# Gatsby files
104+
.cache/
105+
# Comment in the public line in if your project uses Gatsby and not Next.js
106+
# https://nextjs.org/blog/next-9-1#public-directory-support
107+
# public
108+
109+
# vuepress build output
110+
.vuepress/dist
111+
112+
# vuepress v2.x temp and cache directory
113+
.temp
114+
115+
# Docusaurus cache and generated files
116+
.docusaurus
117+
118+
# Serverless directories
119+
.serverless/
120+
121+
# FuseBox cache
122+
.fusebox/
123+
124+
# DynamoDB Local files
125+
.dynamodb/
126+
127+
# TernJS port file
128+
.tern-port
129+
130+
# Stores VSCode versions used for testing VSCode extensions
131+
.vscode-test
132+
133+
# yarn v2
134+
.yarn/cache
135+
.yarn/unplugged
136+
.yarn/build-state.yml
137+
.yarn/install-state.gz
138+
.pnp.*
139+
140+
### Node Patch ###
141+
# Serverless Webpack directories
142+
.webpack/
143+
144+
# Optional stylelint cache
145+
146+
# SvelteKit build / generate output
147+
.svelte-kit
148+
149+
### VisualStudioCode ###
150+
.vscode/*
151+
!.vscode/settings.json
152+
!.vscode/tasks.json
153+
!.vscode/launch.json
154+
!.vscode/extensions.json
155+
!.vscode/*.code-snippets
156+
157+
# Local History for Visual Studio Code
158+
.history/
159+
160+
# Built Visual Studio Code Extensions
161+
*.vsix
162+
163+
### VisualStudioCode Patch ###
164+
# Ignore all local history of files
165+
.history
166+
.ionide
167+
168+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"trailingComma": "none",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"endOfLine": "auto",
6+
"bracketSpacing": true,
7+
"vueIndentScriptAndStyle": false,
8+
"htmlWhitespaceSensitivity": "ignore",
9+
"printWidth": 88,
10+
"singleQuote": true,
11+
"plugins": ["prettier-plugin-organize-imports"]
12+
}

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:18 as builder
2+
3+
COPY . .
4+
RUN npm install
5+
RUN npm run build
6+
7+
FROM node:18-slim as runtime
8+
9+
COPY --from=builder dist .
10+

0 commit comments

Comments
 (0)