Git Product home page Git Product logo

franklin-service's Introduction

(Create) Franklin Service

Bootstrap your Project Franklin service using npm init @adobe/franklin-service

Status

codecov GitHub Actions GitHub license GitHub issues LGTM Code Quality Grade: JavaScript semantic-release

Installation

Not needed.

Usage

$ $ npm init @adobe/franklin-service

create-franklin-service will ask you a couple of questions and create a ready-to-go directory

Development

Build

$ npm install

Test

$ npm test

Lint

$ npm run lint

franklin-service's People

Contributors

adobe-bot avatar dependabot[bot] avatar dominique-pfister avatar dylandepass avatar greenkeeper[bot] avatar kptdobe avatar lgtm-com[bot] avatar marquiserosier avatar renovate-bot avatar renovate[bot] avatar rofe avatar semantic-release-bot avatar stefan-guggisberg avatar trieloff avatar tripodsan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

franklin-service's Issues

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Error on new template creatino

Error message
(node:5954) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/swarali/.npm/_npx/5826/lib/node_modules/@adobe/create-helix-service/template/dot-eslintignore'
(node:5954) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5954) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: config
Error type: Invalid allowedVersions
Message: The following allowedVersions does not parse as a valid version or range: "<15>"

Fails to init a repo

file:///Users/trieloff/.npm/_npx/c55e88af17f2c7a2/node_modules/@adobe/create-franklin-service/create-franklin-service.js:32
      .filter((item) => item?.items?.[0]?.key?.value === 'helix-post-deploy/monitoring')[0].items[0].value.items;
                                                                                           ^

TypeError: Cannot read properties of undefined (reading 'items')
    at dot-circleci/config.yml (file:///Users/trieloff/.npm/_npx/c55e88af17f2c7a2/node_modules/@adobe/create-franklin-service/create-franklin-service.js:32:92)
    at file:///Users/trieloff/.npm/_npx/c55e88af17f2c7a2/node_modules/@adobe/create-franklin-library/create-franklin-shared.js:164:21
    at async Promise.all (index 6)
    at async file:///Users/trieloff/.npm/_npx/c55e88af17f2c7a2/node_modules/@adobe/create-franklin-library/create-franklin-shared.js:159:7

package.json cannot be patched

$ npm init @adobe/helix-service "Helix Data Embed"
Creating a new Helix Service
? Title of the project (human readable) Helix Data Embed
? Name of the project (lowercase, for GitHub) helix-data-embed
? Name of the org (for NPM) adobe
? Name of the org (for GitHub) adobe
? Description (for the README) Turns data into embed-friendly JSON arrays
? What kind of service is this? Delivery

Created directory helix-data-embed

Copying src/index.js
Skipping package.json
Skipping node_modules
Skipping create-helix-service.js
Skipping README.md
Copying LICENSE.txt
Copying CHANGELOG.md
Copying .github/workflows/release.yml
Copying .github/workflows/main.yml
Copying .github/pull_request_template.md
Copying .github/move.yml
Copying .github/ISSUE_TEMPLATE/feature_request.md
Copying .github/ISSUE_TEMPLATE/discussion.md
Copying .github/ISSUE_TEMPLATE/bug_report.md
Copying completed

Patching package.json
Patching README.md
Patching package-lock.json
Patching .eslintignore
Patching .eslintrc.js
Patching .releaserc.js
Patching .npmignore
Patching .gitignore
Patching config.yml
(node:25281) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/lars/.npm/_npx/24951/lib/node_modules/@adobe/create-helix-service/template/package.json'
(node:25281) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:25281) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

$ ls helix-data-embed/package.json
ls: helix-data-embed/package.json: No such file or directory

An in-range update of @adobe/helix-status is breaking the build 🚨

The dependency @adobe/helix-status was updated from 4.3.3 to 4.3.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@adobe/helix-status is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ci/circleci: build: Your tests failed on CircleCI (Details).
  • Tidelift: Dependencies checked (Details).
  • build: * build - Failed
  • branch-deploy - Blocked

Release Notes for v4.3.4

4.3.4 (2019-09-27)

Bug Fixes

  • monitoring: remove deprecated locations, reduce overall number (a2b619f), closes #50
Commits

The new version differs by 7 commits.

  • 9290291 chore(release): 4.3.4 [skip ci]
  • 6f50ef6 Merge pull request #51 from adobe/reduce-monitor-locations
  • a2b619f fix(monitoring): remove deprecated locations, reduce overall number
  • 4d599bb chore: fix issue with new relic
  • 7ac9c0f chore: fix issue with new relic
  • 6650136 chore: upgrade all
  • 55adc80 chore: migrate to helix-log

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Command not found

npm init @adobe/franklin-service
Need to install the following packages:
  @adobe/[email protected]
Ok to proceed? (y) y
sh: create-franklin-service: command not found
npm ERR! code 127
npm ERR! path /Users/trieloff/Code
npm ERR! command failed
npm ERR! command sh -c -- create-franklin-service

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/trieloff/.npm/_logs/2022-11-15T08_52_03_402Z-debug-0.log

Error on new service creation

Run npm init @adobe/helix-service, go through the wizard (Development service) and you get:

Created directory xyz

Copying test/post-deploy.js
Copying test/index.test.js
Copying test/index-epsagon.test.js
Skipping template
Copying src/index.js
Skipping package.json
Skipping node_modules
Copying docs/API.md
Copying create-helix-service.js
Skipping README.md
Copying LICENSE.txt
Copying CONTRIBUTING.md
Copying CODE_OF_CONDUCT.md
Copying CHANGELOG.md
Copying completed

Patching package.json
Patching README.md
Patching package-lock.json
Patching .eslintignore
Patching .eslintrc.js
Patching .releaserc.js
Patching .npmignore
Patching .gitignore
Patching config.yml
(node:60791) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/acapt/.npm/_npx/60274/lib/node_modules/@adobe/create-helix-service/template/.circleci/config.yml'
(node:60791) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:60791) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

npm test doesn't provide details about failing tests

Description
npm test doesn't show failing tests:

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |      100 |      100 |      100 |      100 |                   |
 index.js |      100 |      100 |      100 |      100 |                   |
----------|----------|----------|----------|----------|-------------------|
npm ERR! Test failed.  See above for more details.

Expected behavior
Details about the failing test(s) should be provided when running npm test, e.g.

1) Index Tests
       index function return statusCode:

      AssertionError [ERR_ASSERTION]: 200 == 400
      + expected - actual

      -200
      +400
      
      at Context.it (test/index.test.js:30:12)

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |      100 |      100 |      100 |      100 |                   |
 index.js |      100 |      100 |      100 |      100 |                   |
----------|----------|----------|----------|----------|-------------------|
npm ERR! Test failed.  See above for more details.

remove rerdundant istanbul dependency

Description
The "istanbul": "^1.1.0-alpha.1" dependency in the package.json is redundant. We're using nyc in the scripts and the nyc dependency already includes istanbul.

Furthermore there's the risk of potential conflicts. request 2.88.0 e.g. has a dependency on nyc 14.1.1 which in turn conflicts with istanbul 1.1.0-alpha.1. This conflict leads to the following error when running npm test:

internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'xunit'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

To Reproduce
Steps to reproduce the behavior:

  1. add [email protected] dependency to package.json
  2. npm i && npm test
  3. See above error

New action name is... "service"

Run npm init @adobe/helix-service and fill with wizard with "dummy" (to generate a helix-dummy service).
Run npm run deploy

-> the generated action is service: "https://adobeioruntime.net/api/v1/web/acapt/helix-services-private/[email protected]

Expect: action name is helix-dummy like everything else.

URL in Readme is wrong

Wrong

curl https://adobeioruntime.net/api/v1/web/helix/helix-services/service@v1

correct

curl https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v1

Unable to create new helix service

When creating a new helix service with npm init @adobe/helix-service, creation of the git repo fails:

(node:7451) UnhandledPromiseRejectionWarning: Error: Command failed: git init -b main
error: unknown switch `b'
usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]

According to this stackoverflow article, one needs to specify the default branch name in two steps.

Leftover file create-helix-service.js remains

ls -la
total 1232
drwxr-xr-x  20 lars  staff     640 Mar 19 14:12 .
drwxr-xr-x  58 lars  staff    1856 Mar 19 14:12 ..
drwxr-xr-x   3 lars  staff      96 Mar 19 14:12 .circleci
-rw-r--r--   1 lars  staff      21 Mar 19 14:12 .eslintignore
-rw-r--r--   1 lars  staff     684 Mar 19 14:12 .eslintrc.js
drwxr-xr-x  12 lars  staff     384 Mar 19 14:12 .git
-rw-r--r--   1 lars  staff      83 Mar 19 14:12 .gitignore
-rw-r--r--   1 lars  staff      60 Mar 19 14:12 .npmignore
-rw-r--r--   1 lars  staff     604 Mar 19 14:12 .releaserc.js
-rw-r--r--   1 lars  staff   14142 Mar 19 14:12 CHANGELOG.md
-rw-r--r--   1 lars  staff    3222 Mar 19 14:12 CODE_OF_CONDUCT.md
-rw-r--r--   1 lars  staff    3230 Mar 19 14:12 CONTRIBUTING.md
-rw-r--r--   1 lars  staff   14349 Mar 19 14:12 LICENSE.txt
-rw-r--r--   1 lars  staff    1659 Mar 19 14:12 README.md
-rwxr-xr-x   1 lars  staff    1849 Mar 19 14:12 create-helix-service.js <------- 
drwxr-xr-x   3 lars  staff      96 Mar 19 14:12 docs
-rw-r--r--   1 lars  staff  556153 Mar 19 14:12 package-lock.json
-rw-r--r--   1 lars  staff    2629 Mar 19 14:12 package.json
drwxr-xr-x   3 lars  staff      96 Mar 19 14:12 src
drwxr-xr-x   5 lars  staff     160 Mar 19 14:12 test

An in-range update of @semantic-release/github is breaking the build 🚨

The devDependency @semantic-release/github was updated from 5.4.1 to 5.4.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@semantic-release/github is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: build: Your tests failed on CircleCI (Details).
  • build: * build - Failed
  • branch-deploy - Blocked

Release Notes for v5.4.2

5.4.2 (2019-06-30)

Bug Fixes

  • package: update globby to version 10.0.0 (0231e7b)
Commits

The new version differs by 1 commits.

  • 0231e7b fix(package): update globby to version 10.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @adobe/openwhisk-action-builder is breaking the build 🚨

The devDependency @adobe/openwhisk-action-builder was updated from 1.3.1 to 1.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@adobe/openwhisk-action-builder is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: build: Your tests failed on CircleCI (Details).
  • Tidelift: Dependencies checked (Details).
  • build: * build - Failed
  • branch-deploy - Blocked

Commits

The new version differs by 7 commits.

  • 1e3a6e7 chore(release): 1.4.0 [skip ci]
  • 293ff57 feat(builder): trigger release
  • b89a261 test(unzip): replace unzip2 with yauzl due to security fixes (#61)
  • b752f94 refactor(lib): extract helper to own package (#60)
  • b544def chore(lint): use airbnb-base and update deps (#58)
  • c02a494 chore(tidelift): adding list of forbidden licenses
  • 8c915f1 chore(docs): update readme

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Unable to create service: missing dot-nycrc.json

% npm init @adobe/helix-service
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=4.0.0', npm: '~1.0.20' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }
Creating a new Helix Service
? Title of the project (human readable) Helix Forms Service
? Name of the project (lowercase, for GitHub) helix-forms-service
? Name of the org (for NPM) adobe
? Name of the org (for GitHub) adobe
? Description (for the README) Service that processes web forms.
? What kind of service is this? Publishing

Created directory helix-forms-service

Copying test/utils.js
Copying test/post-deploy.js
Copying test/post-deploy-utils.js
Copying test/index.test.js
Skipping template
Copying src/index.js
Skipping package.json
Skipping create-helix-service.js
Skipping README.md
Copying LICENSE.txt
Copying .github/workflows/semver-check.yaml
Copying .github/workflows/semantic-release.yaml
Copying .github/workflows/main.yml
Copying .github/pull_request_template.md
Copying .github/move.yml
Copying .github/ISSUE_TEMPLATE/feature_request.md
Copying .github/ISSUE_TEMPLATE/discussion.md
Copying .github/ISSUE_TEMPLATE/bug_report.md
Copying .circleci/config.yml
Copying completed

Patching package.json
Patching README.md
Patching .eslintignore
Patching .eslintrc.js
Patching .releaserc.js
Patching .npmignore
Patching .gitignore
Patching .nycrc.json
Patching .renovaterc.json
Patching config.yml
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, open '/Users/dylandepass/.npm/_npx/3903b10cf89b84bc/node_modules/@adobe/create-helix-service/template/dot-nycrc.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/dylandepass/.npm/_npx/3903b10cf89b84bc/node_modules/@adobe/create-helix-service/template/dot-nycrc.json'
}
npm ERR! code 1
npm ERR! path /Users/dylandepass/Documents/code/github
npm ERR! command failed
npm ERR! command sh -c create-helix-service

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dylandepass/.npm/_logs/2021-11-08T14_49_09_131Z-debug.log

wsk.name includes helix-

Wrong:

  "wsk": {
    "name": "helix-services-private/helix-data-embed@${version}",
    "linksPackage": "helix-services"
  },

Correct:

  "wsk": {
    "name": "helix-services-private/data-embed@${version}",
    "linksPackage": "helix-services"
  },

see adobe/helix-data-embed@db45763 for a fix

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/codeql.yml
  • actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/main.yaml
  • actions/checkout v4
  • actions/setup-node v4
  • codecov/codecov-action v4
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/semver-check.yaml
npm
package.json
  • @adobe/create-franklin-library 3.1.8
  • @adobe/fetch 4.1.2
  • @adobe/helix-shared-wrap 2.0.2
  • @adobe/helix-status 10.0.12
  • @adobe/helix-universal-logger 3.0.15
  • dotenv 16.4.5
  • @adobe/eslint-config-helix 2.0.6
  • @semantic-release/changelog 6.0.3
  • @semantic-release/git 10.0.1
  • c8 9.1.0
  • eslint 8.57.0
  • husky 9.0.11
  • lint-staged 15.2.2
  • mocha 10.4.0
  • mocha-multi-reporters 1.5.1
  • semantic-release 23.1.1
template/package.json
  • @adobe/fetch 4.1.2
  • @adobe/helix-shared-wrap 2.0.2
  • @adobe/helix-status 10.0.12
  • @adobe/eslint-config-helix 2.0.6
  • @adobe/helix-deploy 11.1.2
  • @adobe/helix-universal 4.5.2
  • @adobe/semantic-release-coralogix 1.1.28
  • @semantic-release/changelog 6.0.3
  • @semantic-release/exec 6.0.3
  • @semantic-release/git 10.0.1
  • c8 9.1.0
  • dotenv 16.4.5
  • eslint 8.57.0
  • husky 9.0.11
  • junit-report-builder 3.2.1
  • lint-staged 15.2.2
  • mocha 10.4.0
  • mocha-multi-reporters 1.5.1
  • semantic-release 23.1.1

  • Check this box to trigger a request for Renovate to run again on this repository

circleci/config.yml can't be patched

Patching config.yml
(node:26482) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/lars/Code/helix-data-embed/.circleci/config.yml'
(node:26482) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:26482) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.