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: convert to nebula #58

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 0 additions & 90 deletions .circleci/config.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/api-gov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "API Governance"

on:
workflow_dispatch:
inputs:
VERSION:
type: string
description: Version to run against
default: ''
SHA:
type: string
description: Sha of tag
default: ''

jobs:
api-gov:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare API Compliance
shell: bash
run: |
docker pull ghcr.io/qlik-download/api-compliance
docker create -v /specs --name specs alpine:3.4 /bin/true
docker cp api-specifications/properties.json specs:/specs/properties.json

- name: Run API Compliance
shell: bash
run: |
docker run --volumes-from specs \
-e SPEC_PATHS="${{ secrets.API_KEY }}@/specs/properties.json" \
-e COMMIT_SHA="${{ inputs.SHA }}" \
-e RELEASE_TAG="${{ inputs.VERSION }}" \
-e CREDENTIALS_S3_SECRETKEY="${{ secrets.APICULTURIST_S3 }}" \
-e CREDENTIALS_GITHUB="${{ secrets.APICULTURIST_GITHUB }}" \
-e CREDENTIALS_COLONY="${{ secrets.APICULTURIST_TOKEN }}" \
ghcr.io/qlik-download/api-compliance
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build
on:
workflow_dispatch:
inputs:
release:
type: boolean
required: true
default: false
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
uses: qlik-oss/sn-gh-workflows/.github/workflows/build.yaml@v2
secrets: inherit
with:
release: ${{ inputs.release || false}}
api_specification_path: api-specifications/properties.json
17 changes: 17 additions & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Semantic PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ $RECYCLE.BIN/
# Temporary build files
node_modules/
dist/
core/esm/
sn-variance-waterfall-ext/
BUMPED_VERSION

# =========================
Expand Down
48 changes: 48 additions & 0 deletions api-spec/props.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const path = require("path");

const pkg = require(path.resolve(__dirname, "../package.json")); // eslint-disable-line

module.exports = {
fromJsdoc: {
glob: ["./src/ext/initial-properties.js"],
api: {
stability: "stable",
visibility: "public",
properties: {
"x-qlik-visibility": "public",
},
name: `${pkg.name}:properties`,
version: pkg.version,
description: "Variance waterfall generic object definition",
},
output: {
sort: {
alpha: false,
},
file: "./api-specifications/properties.json",
},
parse: {
types: {
GenericObjectProperties: {
url: "https://qlik.dev/apis/json-rpc/qix/schemas#%23%2Fdefinitions%2Fschemas%2Fentries%2FGenericObjectProperties",
},
undefined: {},
"EngineAPI.ValueExpression": {
url: "https://qlik.dev/apis/json-rpc/qix/schemas#%23%2Fdefinitions%2Fschemas%2Fentries%2FValueExpression",
},
"EngineAPI.HyperCubeDef": {
url: "https://qlik.dev/apis/json-rpc/qix/schemas#%23%2Fdefinitions%2Fschemas%2Fentries%2FListObjectDef",
},
},
},
},
toDts: {
spec: "./api-specifications/properties.json",
output: {
file: "./types/index.d.ts",
},
dependencies: {
references: ["qlik-engineapi"],
},
},
};
72 changes: 72 additions & 0 deletions api-specifications/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"scriptappy": "1.1.0",
"info": {
"name": "@nebula/sn-variance-waterfall:properties",
"description": "Variance waterfall generic object definition",
"version": "0.0.1",
"license": "MIT",
"stability": "stable",
"x-qlik-visibility": "public"
},
"entries": {
"properties": {
"extends": [
{
"type": "GenericObjectProperties"
}
],
"entries": {
"version": {
"description": "Current version of this generic object definition",
"type": "string"
},
"qHyperCubeDef": {
"description": "Extends `HyperCubeDef`, see Engine API: `HyperCubeDef`.",
"extends": [
{
"type": "EngineAPI.HyperCubeDef"
}
],
"kind": "object"
},
"showTitles": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
"title": {
"optional": true,
"defaultValue": "",
"type": "string"
},
"subtitle": {
"optional": true,
"defaultValue": "",
"type": "string"
},
"footnote": {
"optional": true,
"defaultValue": "",
"type": "string"
},
"disableNavMenu": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
"showDetails": {
"optional": true,
"defaultValue": true,
"type": "boolean"
},
"showDetailsExpression": {
"optional": true,
"defaultValue": false,
"type": "boolean"
}
},
"kind": "object"
}
},
"definitions": {}
}
4 changes: 4 additions & 0 deletions assets/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Variance waterfall",
"icon": "waterfall"
}
10 changes: 10 additions & 0 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"module": "esm/index.js",
"peerDependencies": {
"@nebula.js/stardust": ">=4.6.1",
"hammerjs": "^2.0.8",
"picasso-plugin-hammer": ">=2.2.5",
"picasso-plugin-q": ">=2.2.5",
"picasso.js": ">=2.2.5"
}
}
21 changes: 21 additions & 0 deletions nebula.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require("path");
const crypto = require("crypto");

const { name, version } = require(path.resolve(__dirname, "./package.json")); // eslint-disable-line

const versionHash = crypto
.createHash("md5")
.update(`${name}@${version}`)
.digest("hex")
.slice(0, 4);

const replacementStrings = {
"process.env.VERSION_HASH": JSON.stringify(versionHash),
"process.env.PACKAGE_VERSION": JSON.stringify(version),
};

module.exports = {
build: {
replacementStrings,
},
};
Loading
Loading