Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
157b58a2
Commit
157b58a2
authored
2 years ago
by
James Long
Browse files
Options
Downloads
Patches
Plain Diff
Import only what's needed from the API for importer packages
parent
7b6909ea
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
packages/api/index.js
+1
-2
1 addition, 2 deletions
packages/api/index.js
packages/import-ynab4/importer.js
+7
-3
7 additions, 3 deletions
packages/import-ynab4/importer.js
packages/import-ynab5/importer.js
+5
-1
5 additions, 1 deletion
packages/import-ynab5/importer.js
with
13 additions
and
6 deletions
packages/api/index.js
+
1
−
2
View file @
157b58a2
let
bundle
=
require
(
'
./app/bundle.api.js
'
);
let
injected
=
require
(
'
./injected
'
);
let
methods
=
require
(
'
./methods
'
);
let
utils
=
require
(
'
./utils
'
);
let
injected
=
require
(
'
./injected
'
);
let
actualApp
;
async
function
init
({
budgetId
,
config
}
=
{})
{
...
...
This diff is collapsed.
Click to expand it.
packages/import-ynab4/importer.js
+
7
−
3
View file @
157b58a2
// This is a special usage of the API because this package is embedded
// into Actual itself. We only want to pull in the methods in that
// case and ignore everything else; otherwise we'd be pulling in the
// entire backend bundle from the API
const
actual
=
require
(
'
@actual-app/api/methods
'
);
const
{
amountToInteger
}
=
require
(
'
@actual-app/api/utils
'
);
const
AdmZip
=
require
(
'
adm-zip
'
);
const
d
=
require
(
'
date-fns
'
);
const
normalizePathSep
=
require
(
'
slash
'
);
const
uuid
=
require
(
'
uuid
'
);
const
AdmZip
=
require
(
'
adm-zip
'
);
const
actual
=
require
(
'
@actual-app/api
'
);
const
amountToInteger
=
actual
.
utils
.
amountToInteger
;
// Utils
...
...
This diff is collapsed.
Click to expand it.
packages/import-ynab5/importer.js
+
5
−
1
View file @
157b58a2
// This is a special usage of the API because this package is embedded
// into Actual itself. We only want to pull in the methods in that
// case and ignore everything else; otherwise we'd be pulling in the
// entire backend bundle from the API
const
actual
=
require
(
'
@actual-app/api/methods
'
);
const
d
=
require
(
'
date-fns
'
);
const
uuid
=
require
(
'
uuid
'
);
const
actual
=
require
(
'
@actual-app/api
'
);
function
amountFromYnab
(
amount
)
{
// ynabs multiplies amount by 1000 and actual by 100
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment